Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider changing the name of the "keywords" tables? #8

Open
darrencruse opened this issue Dec 6, 2015 · 0 comments
Open

Consider changing the name of the "keywords" tables? #8

darrencruse opened this issue Dec 6, 2015 · 0 comments

Comments

@darrencruse
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant