Reuben Thomas

lua-users home
wiki

[1]

Language idealist, lover of elegance and simplicity.

Challenge: Design and implement a tiny language that has it all. Oh, perhaps that's a bit hard for a casual challenge!

A bit of history: I first came across Lua because of my interest in virtual machines, and discarded it at once because its VM is language-specific. Not Lua's fault at all. Then I remembered it when I was doing some scripting and cursing Perl for the umpteenth time (I'm not a wizard; I simply can't remember all that magic!) and discovered what a lovely language it is. For I while I did most of my scripting in Lua; now I use Python, for its much richer set of standard libraries. I have used Lua for portable programming: I rewrote [GNU Zile] in Lua, and advocate its use for POSIX programming.

Lua interests:

Thanks for the sample code, some very good material. getopt is a beast and a half! :-) --NickTrout

I agree! Any lua code I can get a look at is great, but this is phenomenal. --JamesHearn

I agree that Perl is a horror. I assume you must have come across Python? I just wondered why you chose Lua over Python, especially for system/parsing scripts. -- You have experience with functional languages, I do not. Which is a good one to learn to get a feel for them? Perhaps there should be a HowLuaComparesWithOtherLanguages? page? Sometimes its nice to see a comparison of features. It also drives people to try and implement the features in Lua. Erm, I'm suggesting that here because I think you're far more qualified to start a page like that if you felt like it ;-) --NickTrout

I finally got around to learning some Python in 2010, and kicked myself for not having done so years ago (I clearly remember standing in a bookshop in about 2000 with a copy of the Python book in my hands, and after several minutes of consideration I put it back on the shelf...). OCaml [2] is probably the best functional language to learn to get a feel, as it combines a rich language with an excellent compiler. Haskell [3] is more purely functional, with lazy evaluation and proper functional I/O, but it'll take a bit longer to get your head around. --ReubenThomas

Python is a good language to learn. It's easy to learn (I should think it'll take you about an afternoon), and supports many programming styles, including functional programming. Sadly its lambdas are restricted in syntax and variable access (remember read-only upvalues?). The libraries of Python are big, but the language itself is fairly small. It has enough novel features to make it worth while for the collector of languages. --DavidJones

RecentChanges · preferences
edit · history
Last edited July 12, 2020 12:00 am GMT (diff)