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.
This account has disabled anonymous posting.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

jyrgenn: Blurred head shot from 2007 (Default)
jyrgenn

September 2022

S M T W T F S
    123
45 678910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags