> 2. This informal introduction leaves a lot unspecified. List several open
> questions you have about the language’s syntax and semantics. What do you
> think the answers should be?
- String escaping, Unicode?
- Interaction with the system (i.e., exit status code)?
- What are the built-in errors?
- What happens when we all a function with the wrong number of arguments? It
would be cool if it were curried...
- Multiple inheritance?
> 3. Lox is a pretty tiny language. What features do you think it is missing
> that would make it annoying to use for real programs? (Aside from the
> standard library, of course.)
No way to interact with the outside world, whether that's files, stdin, or
networking. No parallelization. Somewhat reminiscent of Lua, really.
FossilOrigin-Name: 394141a0b92ff762adcc54b53e4a04786a5374ad42fe312be5c20b6666dbb3f5
> 1. Pick an open source implementation of a language you like. Download the
> source code and poke around in it. Try to find the code that implements the
> scanner and parser. Are they handwritten, or generated using tools like Lex
> and Yacc? (.l or .y files usually imply the latter.)
Of course, I have to pick out Ruby's [parse.y][parse.y]. The file is 14k lines
long, so I have no idea where the scanner and parser are, and I think that
Bison is used for Ruby's YACC?
[parse.y]: https://github.com/ruby/ruby/blob/master/parse.y
> 2. Just-in-time compilation tends to be the fastest way to implement
> dynamically typed languages, but not all of them use it. What reasons are
> there to not JIT?
Probably simplicity first and foremost? I assume there's also at least slight
negative tradeoffs for runtime/memory as well.
> 3. Most Lisp implementations that compile to C also contain an interpreter
> that lets them execute Lisp code on the fly as well. Why?
Is this because Lisp has such a heavy REPL history/culture?
FossilOrigin-Name: 7177648dc716668fe15ac77d3f1ad1c03e5a3d7f6180415ee78de6b61fd9e0e9