Feature Proposals

lua-users home
wiki

Difference (from revision 82 to current revision) (minor diff)

Added: 5a6
* Support 64-bit integers as a native Lua type. The current 'number' type as a double doesn't give 64-bit precision, but many apps which embed Lua need 64-bit integers, forcing them to handle it with a userdata - but that doesn't work for standard-library functions like math and tonumber() coercions. Considering most computers are now 64-bit CPUs and more will be by the time the next major Lua version becomes popular, the ability to use 64-bit integers will become more important.

Added: 65a67
* The type() function is useful for figuring out built-in Lua types, but not for object-oriented tables/userdata. It would be nice to have a new typeof() function which checks its arg for a new metamethod '__typeof'. For example, an embedding app could give each userdata class/object it pushes a metatable __typeof string for its type, and a Lua module providing table-based objects can do likewise.

Some of these are less actual feature proposals than discussion areas for various supposed Lua warts (which may have multiple solutions)...

Core

Libraries and Functionality

Syntax

Semantics

Expressibility

Code Quality/Correctness/Error Handling

Packaging

Coding Style

Uncategorized

User Maintained Lists

These user pages maintain lists of feature proposals:

Lua 5.2

See also LuaFiveTwo.

Past Resolved Issues

These issues were closed, retracted, or since implemented.

Lua Patches

Some features have been implemented as a non-standard patch: LuaPowerPatches. Other ideas are implemented in MetaLuaRecipes.

Miscellaneous Examples

This prints "1". Possibly would be better to require that "--[[" comments terminate with "--]]" rather than just "]]".

--[[
  g = f[x[y]]
  print(1)
--]]

Personal Comments

Can we remove items that are not actually feature proposals from this page (e.g. StoringNilsInTables)? Perhaps start LuaWarts?.

I've started restructuring this page in terms of various classes of problems each containing some number of identified problems each having zero or more proposed solutions. I think the problems themselves are more important and interesting than any one proposed solution when deciding how the language should evolve. Also, the structure of the ResourceAcquisitionIsInitialization and DetectingUndefinedVariables pages is noteworthy: they similarly describe a problem and follow it by various solutions (including design patterns, patches, metaprogramming/source-filtering solutions, proposed language changes, etc.) and therefore fit this structure well. Still maybe this all belongs on a different page. Not all these problems are necessarily solved by language changes, though the existence of them could be a reason to at least consider language changes.--DavidManura

RecentChanges · preferences
edit · history
Last edited March 24, 2013 5:21 pm GMT (diff)