Zen
Zen copied to clipboard
Zen is a general purpose programming language designed to build simple, reliable and efficient programs.
Zen can encourage functional programming with closures. Given Zen does not treat functions as expressions, mostly due to the limitations imposed by indentation based blocks, local functions can be used...
The compiler should analyze the function body to detect statements that are completely unreachable because of return and throw statements that cause a function to exit. Consider the following example:...
Consider the following program. ``` function isEven(n) if n % 2 == 0 return true ``` If this function was invoked with an odd number, null is returned. However, the...
When a newline character appears immediately after a multiline or documentation comment, the lexer generates a newline token. This causes syntax errors. The following code reproduces this bug: ``` class...
Inheritance is a very important feature of object-oriented programming, a mechanism which allows one class to inherit the behaviors and attributes from another class. Inheritance allows you to create a...
Consider the following program: ``` function main(...arguments) var text if random() % 2 == 0 text = 'even' print(text) ``` In the example shown above, text remains uninitialized when random()...
The following Zen program albeit being simple leaves hundreds of garbage when executed on the virtual machine. ``` function main(...arguments) for var i in range(0, 10000): print(i) ``` This problem...
The Zen virtual machine is pretty slow. A few optimizations are currently being implemented. However, to boost the performance further a JIT compiler should be integrated. The Eclipse OMR project...
For the most part, Zen seems to work fine. However, GCC generates a plethora of warnings when building it. Obviously, these warnings are insights into possible hidden bugs that I...
The syntax of the import statement can be extended to bind an entity name to a local name. It is sometimes desirable to bind entity names to a different local...