jyrgenn: Blurred head shot from 2007 (Default)
[personal profile] jyrgenn
Lua has been in the back of my head for a while, cannot remember why. Now that I have looked at it a bit by reading this book (and the Lua 5.1 Reference Manual, which is refreshingly short), I seem to be quite fond if it. I had no opportunity to do much with it yet, but there are quite a few things to like.

Functions are first-class values. Functions can be defined as closures. Environments are (kind of) first-class values, too. The syntax is a bit like Modula (while ... do ... end and the like). Typing is dynamic. Variables are created implicitly, which admittedly simplifies a few things, but I don't like it very much. Nothing of these darned $'s and %'s and @'s of Perl, which is good. And not its irregularities of syntax, which is much better. Lua is probably too small for irregularities anyway.

Tables can have metatables that control accesses to existing and particularly to non-existing fields; this is put to some interesting uses. For instance, packages and OOisms are done through tables as well, openly, but with some clever syntactic sugar around it. I like that. Prototype-based inheritance, not real classes, although you can pretend they are there.

Well, yes. Now I should probably go and do the canonical exercise, write a Lisp interpreter in it. Give me the time, someone, please.
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User (will be screened if not on Access List)
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


Links will be displayed as unclickable URLs to help prevent spam.


jyrgenn: Blurred head shot from 2007 (Default)

January 2018

2829 3031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags