bearophile wrote: > Daniel Murphy: > >> If the only reason for removing 1.f and 1.L is to aid ufcs > > It's not the only reason, it's also a special case of the rule that asks for > a zero. > > >> we should also get rid of leading underscores after the decimal >> point. eg 1._3 also conflicts with ufcs. > > I see (this doesn't look nice regardless of UFCS, but changing it introduces a special case in the use of the underscore). > [snip.]
This is not a particularly strong argument in this case. Numeric literals cannot *start* with an underscore either. For a similar reason. You add some detail to the exception to the usage of the underscore, you do not really introduce a new one. ;) Related: ._1 (Btw: the lexer has to do some check when it encounters '.' within a number anyways. Currently, this is checking if the following character is not '.' The change would turn it into checking if the following character is numeric.) Cheers, -Timon