4 ms·
Programming in Lua, Third Edition released
- taylorlapeyre 14y agoI've decided to take the time to learn a new language thoroughly for the new year to open my eyes to new programming techniques. Lua has really peaked my interest lately, along with Haskell and Clojure. I figure I may as well ask, is Lua a good language for this (coming from a background in Ruby and Java)? If so, this book seems like the place to start.
- tikhonj 14y agoHmm, especially compared to Haskell, you won't learn all that much from Lua. Sure, it's a simple and elegant language with some good ideas, but ultimately it's just the same sausage with a different skin. Of course, this also means you'd probably find it a bit easier to learn (since there isn't all that much to learn). And this makes you more likely to actually go through with learning it properly! I personally think Haskell would be the best option by far, but I'm pretty biased.
- snogglethorpe 14y agoIt all depends on what the goal is of course. They're very different languages. Both should feel rather different than Ruby or Java, I think, in opposite directions: Haskell adds many new language-level features; Lua tosses out a lot. Haskell is a "big" language, and it's an academic language, which seems to be a testbed for many sophisticated language features that are not so common elsewhere. This can be good (lots of interesting new ideas) or bad (esoteric concepts that may not be so useful elsewhere) depending on your point of view. Lua is a "small" language, it's very elegant, but tries to pare down the feature set as much as possible while remaining a practical and usable language. Despite not being a lisp dialect, I'd say in many ways Lua feels similar to old-school minimalist dialects of scheme (before scheme started to ... grow), though in general Lua has more of a "practical" bent. This tends to make the language itself very easy to learn, but of course actually learning a language is generally not enough, one must to some degree learn the culture and techniques to actually have a good grasp on it (and Lua tends to have a lot of subtlety beyond the basic language). Besides the language itself, Lua's other famous property is that it's intended for embedding and use as an extension language, so it's small, fast, very easy to integrate and has a extremely well-designed C-level API. Anyway, I'd say if you're not sure, just learn both... two's not that hard, and learning two such very different approaches at the same time may be quite informative... :]
- taylorlapeyre 14y agoExcellent response, thank you!