rubyx/lib/vool
Torsten Ruger 0b161ffa06 move ruby_method out of rubyx
ruby getting ready for destruction as it’s not used anymore
2017-08-31 16:11:06 +03:00
..
statements move ruby_method out of rubyx 2017-08-31 16:11:06 +03:00
README.md start a vool readme 2017-04-05 14:02:34 +03:00
ruby_compiler.rb start better if mom test 2017-08-30 22:27:12 +03:00
statement.rb first stab at moms if 2017-08-30 17:21:13 +03:00
vool_compiler.rb first stab at moms if 2017-08-30 17:21:13 +03:00
vool_method.rb move ruby_method out of rubyx 2017-08-31 16:11:06 +03:00

VOOL

Virtual Object Oriented Language

in other words, ruby without the fluff.

Possibly later other languages can compile to this level, eg by running in the same jvm.

Syntax tree

Vool is the layer of concrete syntax tree. The Parser gem is used to parse ruby. It creates an abstract syntax tree which is then transformed.

The next layer down is the Vom, Virtual object Machine, which uses an instruction tree. That is on the way down we create instructions, but stay in tree format. Only the next step down to the Risc layer moves to an instruction stream.

The nodes of the syntax tree are all the things one would expect from a language, if statements and the like. There is no context yet, and actual objects, representing classes and methods, will be created on the way down.

Fluff

Ruby has lots of duplication to help programmers to write less. An obvious example is the existence of until, which really means if not. Other examples, some more impactful are:

  • No implicit blocks, those get passed as normal arguments (the last)
  • No splats
  • no case
  • no elseif (no unless, no ternary operator)
  • no global variables.