Is Lua the basis, first of all, of well-established ideas in a programming language?

Lua has a good place in the space of languages โ€‹โ€‹that can be embedded. Are Lua core ideas designing new ideas from developers, or is Lua primarily a well-executed combination of well-known ideas?

Comparing the properties and features of Lua with other PLs is especially appropriate.

+61
lua language-design
Jan 20 '10 at 11:18
source share
5 answers

This is a very interesting question. My day job is to learn programming languages, and Lua will study carefully. I would say about very few other languages โ€‹โ€‹(perhaps Icon and CLU). Note that this is the language as a whole, and not the individual features, which makes Lua so worthy of study.

Is this the result of interesting new ideas that the developers had, or is it the result of a good fulfillment of established ideas?

I. For more information, the best source for answering this question is The Evolution of Lua , which appeared at the third ACM Symposium on the History of Programming Languages. But I will add a few comments.

  • Using Lua tables as the only mutable non-atomic data type was invented by the Lua team. They were inspired by the events in the CLU, and I believe that they knew about similar work in Awk and Icon, but clarification to this extent is an important contribution of the Lua team.

    Tables also have a very efficient implementation, which was invented by the Lua team.

  • Lua's functionality has the same semantics as Scheme, but Lua has a unique implementation of first-class functions that I think they should submit for publication in the Journal of Functional Programming.

  • The implementation API has been greatly improved over the years. Its main distinguishing feature is that custom abstract types can fully participate in embedding. This is the property that makes the Lua API superior to the Tcl API, for example. Over the years, the Lua API has undergone significant improvements, including since its first publication in version 2.5. Lua designers deserve great credit here.

  • Garbage collection technology is standard.

  • Lua coroutines represent a new approach to some very old ideas. The new approach is considered worthy of publication in ACM Transactions in programming languages โ€‹โ€‹and systems, so again I think that the Lua team deserves originality.

  • Lua metadata is associated with a common Lisp meta object.

I think the success of Lua stems from a unique combination of the strengths of the Lua team:

  • If you read the HOPL document, you will see that the Lua team was well aware of many developments in programming languages โ€‹โ€‹and were able to choose from the best ideas. Most developers of popular scripting languages โ€‹โ€‹were amateurs and were not so well informed.

  • Lua is superbly designed so that the pieces combine very well with an excellent power to weight ratio. This was the result of much improvement over time, and PUC-Rio wanted the Lua team to work on the design and implementation of the language, rather than shredding a huge amount of paper. This work could not be done at a North American university.

  • Lua is superbly designed. The implementation is just amazingly good. This is partly an excellent work of great engineers and partly the ability to constantly revise design over a 15-year period.

I will close by asking readers not to underestimate the difficulty of choosing and refining well-established ideas in order to form a single whole. This is an extremely difficult job and is rarely recognized, as it should be.

+128
Jan 20 '10 at 15:17
source share

Lua supports functional programming and is based on the Prototype-based programming style, which is flexible and powerful.

IMO is an interesting language.

If you want to read some thoughts about prototype inheritance, I suggest you read the article by Steve Yegge Publishing Universal Design Blog .

+7
Jan 20 '10 at 12:20
source share

Lua is small, the general code is only tens of thousands of lines in ANSI C. (Python has ten lines of code).

Lua is very stable, or, say, the language is fixed.

Louis has good engineering. Its code is easy to read and crack. (also because small)

His license allows you to do what you want.

Writing C extensions in Lua is simpler than other languages, such as Python.

+4
Jan 20 '10 at 11:46
source share

There's a Lambda The Ultimate Story, Small is Beautiful: A Lua design discussing a recent talk by Robert Jerusulsky at Stanford of the same name, The discussion currently focuses on the benefits of having tables as the only container data structure; so far, little has been said in another part of the conversation regarding the Lua C interface.

+2
Apr 01 2018-10-10T00:
source share

I think this is because Lua is relatively simple and pragmatic. It does not try to be the language for creating the next operating system, Crysis 3 or the SAP clone, but what it does is good, that is, it serves as a scripting language.

0
Jan 20 '10 at 11:52
source share



All Articles