Sjoerd Visscher's weblog
My ideas about new web technology that can change the future of the world wide web.
< Monday, December 16, 2002 >
The friendlier Loell
Since the last Loell update, the language has become a lot more user friendly. Precedence and unary operators are implemented, so arithmetic formulas now work as expected. The ;
expression separator is now optional at the end of a line. Extra indentation on new lines prevents the insertion of a separator. Lists are now built-in. The list syntax uses the ;
expression separator too, which is also optional at the end of a line. Lists have support for Ruby-like collect
, in the form of two methods: all
and some
. The difference is in the handling of failures:
[1; 'a'; 3] all {that*2} // --> failure [1; 'a'; 3] some {that*2} // --> [2; 6]
Another new feature is an 'else' for closures, which together with the (runtime) assertions gives a clean syntax, similar to Haskell's guards.
Number.sign = {this gt 0; 1} | {this lt 0; -1} | 0