After several rewrites of my GC memory code and implementing most of the
code for Ruby runtime, I’m now posed with the issues of parsing and language
specification. All the class/module/object/methods/vars code is in place.
It’s cool to see the arms and legs working…now to put the heart in place!
- Use Bison to generate parser - if I can’t integrate that well with C++,
use PCCTS instead.
- Generate AST - this is kind of how Ruby executes now, from a code tree.
- Generate VM Bytecode. Stack/register based connundrum.
Matz - I’ve enjoyed trawling through 7 years of history in the form of your
original Ruby C code!
You weren’t kidding when you said the current Ruby interpreter is
I’m hoping that by creating a solid C++ version, I’ve improved the API and
reduced the number of programming errors possible through safer type
I’d like to hear from any Ruby programmers here what they would change about
the implementation - the language and it’s built-in features rather than any
support libraries. Some of my thoughts:
Ruby comes with a hell of a lot of features built-in, like the Perl $
variables and so on. Shouldn’t all this perhaps be classed as an extension?
I kind of like the idea of a very clean and elegant language out of the box.
I like the idea of named method parameters (ala Smalltalk, Objective-C).
There was a discussion elsewhere showing something similar using hash
tables. With a bit of syntactic sugar… :var => 10 could be var: 10