lua-users home
lua-l archive

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


On Fri, Apr 2, 2021 at 11:14 PM Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>
> > I am wondering,  was removing the "number type selection macros" (or
> > rather limiting them to float vs double if I get it right) a decision
> > of the Lua team because of the increased complexity of Lua 5.3?  or
> > was it a decision to "give up" MCus as a potential target and focus on
> > larger and more "modern" platforms (x86, ARM)?
>
> What do you mean by 'removing the "number type selection macros"'?

What I mean by 'removing "number type selection macros" (or rather
limiting them to float vs double if I get it right)" ' is the
following:

My (limited) understanding at the moment is that it was possible to
build Lua5.1 with numbers being either floats or integers only by
changing a few macros in luaconf.h, and that it is no longer possible
to do this with Lua 5.3+:

   Lua5.1/luaconf.h:  @@ LUA_NUMBER is the type of numbers in Lua.

   Lua5.4/luaconf.h:  @@ LUA_NUMBER is the floating-point type used by Lua.

Thanks to the link kindly provided by Luiz, I read your suggestion on
the list in 2015 [1] but didn't have time to test it. -- [1]
http://lua-users.org/lists/lua-l/2015-10/msg00321.html

So, maybe I am wrong on this, and just by editing a few #define in
luaconf.h it is possible to build a Lua where all numbers are
integers, and my question is moot.

If not, I guess my question boils down to: do you consider that
building Lua without floats is now out of scope for the Lua team?

Hope it was more clear,

Phil