lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Wed, May 3, 2017 at 1:26 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2017-05-03 7:46 GMT+02:00 Jonathan Goble <jcgoble3@gmail.com>:
> Bugs are not restricted to only code. Documentation can also have bugs, such
> as when it is not clear on something or gives incorrect information.

Well, if "index with" rather than "can have index" is deemed a bug,
then Nicolas Bourbaki is alive and well and hyperactive on Lua-L.


Not all behavior HAS to be defined. Almost all programming language definitions (like C's) leave things undefined or implementation defined. This allows the implementation some freedom. So if you want defined behavior from associative arrays in Lua don't use nil or any of the NaN values as an index. Lua 5.3.5 could behave differently without breaking the spec.

Other things are not fully defined either: if you use the '#' operator on a table you get a 'border'. If more than one border exists the implementation can give you *any* border. There's no requirement that two runs of the same program produce the same results. You will likely see different behaviors depending on which version of the C compiler and/or standard libraries you're using, the settings of the Lua garbage collector, and plenty more things.

I would not call this a bug.

--
--