Dark Mode

Jump to content

Talk:Lua

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This level-5 vital article is rated C-class on Wikipedia's content assessment scale.
It is of interest to multiple WikiProjects.
Brazil: Education and science Low-importance
This article is within the scope of WikiProject Brazil, a collaborative effort to improve the coverage of Brazil and related topics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.BrazilWikipedia:WikiProject BrazilTemplate:WikiProject BrazilBrazil
LowThis article has been rated as Low-importance on the project's importance scale.
This article is supported by the Education and Science in Brazil task force (assessed as Low-importance).
Computer science Mid-importance
This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.Computer scienceWikipedia:WikiProject Computer scienceTemplate:WikiProject Computer scienceComputer science
MidThis article has been rated as Mid-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

Computing: Software / Free and open-source software Mid-importance
This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.ComputingWikipedia:WikiProject ComputingTemplate:WikiProject ComputingComputing
MidThis article has been rated as Mid-importance on the project's importance scale.
This article is supported by WikiProject Software.
This article is supported by Free and open-source software (assessed as Mid-importance).

On 4 April 2025, it was proposed that this article be moved from Lua (programming language) to Lua. The result of the discussion was moved.

Can embedding Lisp-like code?

[edit]

e.g.:

quote(string) -> "string"
quote(quote(expr)) -> "quote(expr)"
quote(quasiquote(expr)) -> "quasiquote(expr)"
quote(quasiquote(unquote(expr))) -> "quasiquote(unquote(expr))"
quote(unquote(expr)) -> "unquote(expr)"
quasiquote(string) -> "string"
quasiquote(quote(expr)) -> "quote(expr)"
quasiquote(quasiquote(expr)) -> "quasiquote(expr)"
quasiquote(unquote(expr)) -> expr

Not strongly typed

[edit]

Info box says in "Typing discipline", "strong", but that is not true.

Similar to PHP or JavaScript, (and probably Perl and AWK), Lua has is weakly typed especially in arithmetic, i.e. "10" + 1 is allowed and result is integer 11 (technically number 11.0). Same with "5.5" * "2", is integer 11. On the other hand indexing into a "array" (table), t["1"] and t[1] are different (but t[0+"1"] and t[1] are same).

Some people argue that that is still strong typing, because for string concatenation one would use ".." in Lua. But that is not good enough argument. For example Wikipedia says C is weakly typed, but arguably Lua has even weaker type system, due to above mentioned value coercion in arithmetic, which does not happen in C. 81.6.34.169 (talk) 01:32, 1 September 2024 (UTC)[reply]

Problems with "Inheritance" section

[edit]

The "Inheritance" subcategory in the article is written and phrased in a way that could easily lead a reader to believe believe features such as multiple inheritance are features built into the Lua language. However, the technique is a pattern implemented using metatables, not a language feature.

While the "Object-oriented programming" category above does indeed explain that Lua doesn't have a built-in concept of classes, the addition of the class inheritance section below it seems to deviate from that tone, and it describes a niche pattern that is rarely used; it feels like somebody wrote their own little pet program in Lua and added it to the article masquerading as a feature. 24.68.84.200 (talk) 07:17, 29 September 2024 (UTC)[reply]

The issue has been fixed in this edit: https://en.wikipedia.org/w/index.php?title=Lua&diff=prev&oldid=1323039620 ~2025-34505-43 (talk) 14:00, 19 November 2025 (UTC)[reply]

Requested move 4 April 2025

[edit]
The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: moved. (closed by non-admin page mover) Cremastra talk 20:20, 11 April 2025 (UTC)[reply]


- Lua (programming language) is clearly the WP:PRIMARYTOPIC. 2600:1700:6180:6290:E1BC:304B:79DF:C9EB (talk) 19:43, 4 April 2025 (UTC)[reply]

RedactedHumanoid (talk) 19:51, 7 April 2025 (UTC)[reply]
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.