Skip to content

Instantly share code, notes, and snippets.

@microbial
Last active December 26, 2015 01:49
Show Gist options
  • Save microbial/7074440 to your computer and use it in GitHub Desktop.
Save microbial/7074440 to your computer and use it in GitHub Desktop.
Translation of linguistic objects into programming objects and methods
Linguistic - disection of a sentence or command
[subject] = noun (always implied)
object = noun (person, place, or thing, i.e. "car")
objectAttributes = adjectives (desribes a noun, i.e. "red")
action = verb (action word, i.e. "drive")
actionAttributes = adverb (describes an action, i.e. "slowly")
SENTENCE = subject + action + object (i.e., [I] drive [the] red car slowly.)
Mapping of linguistic elements to programming objects
linguistic.object.objectAttributes = new Object [ i.e. new Car or new Car.color = 'red' ]
linguistic.action.actionAttributes = function( attrs )
[ i.e. drive('slowly') or drive( Object ).slowly() ]
TranslatedCommand = drive( new Car.color('red') ).slowly()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment