You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dialect in sugarlisp is made up of two parts: the "syntax" table and the "keywords" table.
The syntax table is similar to the read table of reader macros in a classic lisp. I intentionally chose to call it "syntax table" rather than "read table" because I didn't want to create a false impression that sugarlisp works exactly the same as other lisps that have read tables.
Then the "keywords" tables are what drive code generation and hold both the functions that generate code as well as (compiled) macros. Here the name was chosen partly because it's the name LispyScript had used and partly because I couldn't think of a better name. It was meant in the sense of reserved "keywords" in traditional languages (where basically "reserved words" really are the names used for lookups in the keywords tables).
But: "keywords" in Common Lisp and Clojure refer to :keywords (which currently sugarlisp does not have - mainly because there is no direct corollary in javascript and sugarlisp is trying above all to be easy for javascript programmers).
So maybe "keywords" table was an unfortunate/confusing choice of name for those coming from a lisp background.
I'm still unsure what a better name is though... the notion of "reserved keywords" really is close to what it holds - I can't decide what other name conveys that idea as well. It is the table that controls macro expansion and code generation - maybe I should simply call it the "translation" table. Or maybe it's the "transform" table?
The text was updated successfully, but these errors were encountered:
A dialect in sugarlisp is made up of two parts: the "syntax" table and the "keywords" table.
The syntax table is similar to the read table of reader macros in a classic lisp. I intentionally chose to call it "syntax table" rather than "read table" because I didn't want to create a false impression that sugarlisp works exactly the same as other lisps that have read tables.
Then the "keywords" tables are what drive code generation and hold both the functions that generate code as well as (compiled) macros. Here the name was chosen partly because it's the name LispyScript had used and partly because I couldn't think of a better name. It was meant in the sense of reserved "keywords" in traditional languages (where basically "reserved words" really are the names used for lookups in the keywords tables).
But: "keywords" in Common Lisp and Clojure refer to :keywords (which currently sugarlisp does not have - mainly because there is no direct corollary in javascript and sugarlisp is trying above all to be easy for javascript programmers).
So maybe "keywords" table was an unfortunate/confusing choice of name for those coming from a lisp background.
I'm still unsure what a better name is though... the notion of "reserved keywords" really is close to what it holds - I can't decide what other name conveys that idea as well. It is the table that controls macro expansion and code generation - maybe I should simply call it the "translation" table. Or maybe it's the "transform" table?
The text was updated successfully, but these errors were encountered: