Table of Contents for Programming Languages: a survey
Chapter : misc
main
in some languages, e.g. Python, any code in the outermost lexical scope is run as it is encountered; so the 'main' top-level program code is typically put at the bottom of a file, so that it will be run after everything above it (which imports and defines relevant functions and data structures) finishes.
in other languages, e.g. C, a special 'main' function must be explicitly defined, and this is the only thing which is run when the program executes (in contrast with running everything in the outermost lexical scope).
constraint satisfaction
(and logic programming)
(this deserves its own chapter, at least)
grammar
(as a Turing-universal alternative)
(this probably deserves its own chapter too)
knowledge representation and inference
RDF, etc
other stuff from ai goes here? inheritance networks?
computer ontologies
(todo)
also note: different languages have different paradigms and corresponding ontologies, e.g. smalltalk has actors and messages, etc
contrast to philosophical ontologies
what else?
should i put an appeal to look at natural language used in informal explanation of algorithms somewhere? "this guy sees __ and wants __ so he goes over here..." etc?
characteristics:
- uses simple words that children know
- anthropomorphizes abstractions such as elements of data, subroutines, etc
- ascribes perception; abstractions can see things
- ascribes goals/intent; abstractions want things
- abstractions can be in various states of wanting, e.g. hunger
- abstractions have the same repertoire of simple actions as humans; abstractions can put, get, go, take, etc
- linear time
- sometimes abstractions can perform inference, but this is usually not actually a stand-in for part of the computation, but rather a way to explain reasoning about why the algorithm is correct
- what parts are NOT typically anthropomorphized?
- emotions beyond intent; an abstraction might be 'happy' when they reach their goal-state and 'anxious' when a goal-state is not yet fulfilled but are rarely 'joyous' or 'anxious' for no reason, and are rarely 'angry' or 'jealous'. However this is not always true; sometimes 'jealousy' or 'eagerness' is used, but these are often either too-clever-slightly-humorous ways of explaining something that could be explained more simply in other ways, or grasping for new words for some formal domain (e.g. strict vs. eager evaluation).
- unproductive habits. abstractions don't usually procrastinate or fret. they might go to sleep when they could be working, but this is a way of representing a simple state change, not a commentary on their internal cognitive machinery or willpower.
- a wide range of detailed individual attributes. an abstraction might be tall or short, and might be various colors, but if they have both hair color and eye color, which is which was probably an arbitrary choice. it would be unlikely to find abstractions with all of a height, an eye color, hair color, hair length, muscle strength, nose size, and eyebrow length, and if we do find one these are likely to just be placeholders for arbitrary attributes.
- complex 'fuzzy' attributes. an abstraction might be male or female, 5'10, or even tall or short (although the relationship between height and the word 'tall' is fuzzy in real life, in the model we can pretend there is a discrete cutoff), but an abstraction is unlikely to have full-bodied hair.
- intransitive verbs that vaguely denote complex non-goal-directed activities (rather than physical states); an abstraction might sleep or awaken, and might play a movie, but would rarely just play
- distinctions between modalities. An abstraction might see something or hear something but these are interchangable
- the less precise and less objectively communicatable modalities. abstractions see or hear things but don't usually feel or smell things.
- actions relating to expression of emotions that abstractions don't have, or to distinctions between modalities that they don't have e.g. an abstraction rarely cries or sing or laugh
- undesirable facts of biological reality. abstractions rarely cough or get sick or excrete. however, often they do die.
- note that all of these rules for what abstractions don't do can easily be broken; if a person, after reading this list, wanted to, they could easily describe a sorting algorithm in terms of jealous guys with a good sense of smell, who get sick. It's just that this sort of explanation is atypical.