Last active
December 26, 2015 01:49
-
-
Save microbial/7074440 to your computer and use it in GitHub Desktop.
Translation of linguistic objects into programming objects and methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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