lua-users home
lua-l archive

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


I'm having problems finding the message, but somebody mentioned "just adding '.0' to constants to get floats back". 

Given a flag, the compiler could interpret all numbers as floats; this would be like automatically adding ".0" to all constants. Additionally, syntax could be added to switch the current chunk's interpretation.

How compatible are the changes in the language to this kind of lexical-scoped manipulation?

I can think of one bad example: string methods. If you write "%g":format(n) the meaning of "format" is not scoped in any lexical way. Also, tostring() can be brought in as a local, but functions which implicitly call it will not use the local behavior.

Jay