[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: 5.3 work1: is emulating 5.2 all-float behavior a lexical feature?
- From: Jay Carlson <nop@...>
- Date: Wed, 10 Jul 2013 11:06:06 -0400
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.