There is the Inform programming language, which in its latest incarnation, Inform 7, is very similar to a natural language ... in particular, to a written language.
Inform is very specific for creating adventure text games, but there are no reasons why concepts cannot be expanded to other areas.
Here's a small snippet of Inform 7 code taken from Glass, Emily Short.
Stage is a room. The old lady is a woman in the Stage. Understand "mother" or "stepmother" as the old lady. The old lady is active. The description of the lady is "She looks plucked: thin neck with folds of skin exposed, nose beaky, lips white. Perhaps when her fortunes are mended her cosmetics too will improve." The Prince is a man in the Stage. The description of the prince is "He tolerably attractive, in his flightless way. It hard not to pity him a little." The prince carries a glass slipper. The glass slipper is wearable. Understand "shoe" or "heel" or "toe" or "foot" as the slipper. The description of the slipper is "It is very small for an adult woman foot."
Full code can be found here .
This is a small simple example ... he can really handle a surprisingly robust set of ideas.
It should be noted that the code is not really a weird cypher, where the constructs have hidden meanings ... this code does more or less what you expect. For example:
The old lady is a woman in the Stage. Understand "mother" or "stepmother" as the old lady.
creates an object that is a female face that calls the object "old woman" and places this object in a room object called "Stage". Then two aliases are created ("mother" and "stepmother", which also refer to the object "old woman".
Of course, as examples become more complex, the necessary hoops for the transition also become more complex. English is inherently ambiguous, while computer code is most definitely absent. Therefore, we will never get a “perfect marriage”.
Beska Jan 29 '09 at 16:35 2009-01-29 16:35
source share