-
Notifications
You must be signed in to change notification settings - Fork 0
cout/px
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Goals: - Uniformity: - Everything is an object - The program itself is an object (homoiconity) - All objects are expressions (thus everything is an expression) - Value objects are expressions that return themselves - Expression objects are expressions which evaluate to something other than themselves - All objects are dictionaries (thus everything is a dictionary) - Dictionary keys are objects (not strings) - All objects are mailboxes (thus everything is an actor) - Objects can receive messages - Programs can send messages to objects - Minimalism: - Minimal syntax, enough syntax to be expressive - No keywords - Infix, not prefix (lisp) or postfix (forth) - All infix expressions are evaluatable objects - Tree-structure inherit in syntax - Minimal builtin data types - so far: string, integer, float, object (table) - Ease: - Readability - infix in spite of added parsing complexity - But the infix notation is just syntactic sugar, not an additional language element - Should be simple to expose a C function or C++ class to the VM Basic syntax: - all operators all just messages delivered to the receiving object - valid operators: - any valid infix operator - pairing operators: ':', ',', ';', '\n' - misc operators: [], []=, - code block operator: { } - operations on local variables send messages to the current context - identifier - identifier = value - message syntax: - obj msg - obj msg { block } Open questions: - What kinds of messages are there? So far: - Function call - context push - Fiber - context switch - Why separate mechanisms for attributes (table) and messages? - Nonuniformities: - How can we turn lvar/lasgn into messages? - How can we turn { } into a message? - Once all expression nodes have been reduced to messages, where do we go from there?
About
PX language - parser and runtime
Resources
Stars
Watchers
Forks
Releases
No releases published