On 07Mar2014 00:32, MRAB
On 2014-03-06 23:59, Cameron Simpson wrote:
Coming to this very late, but I was interested in the first thread...
On 05Mar2014 23:04, Steven D'Aprano
wrote: On Wed, Mar 05, 2014 at 11:29:10AM +0000, Oscar Benjamin wrote:
and I would also use Fraction literals if available e.g. 1/3F.
Out of curiosity, why F rather than f?
Well, for me, +1 on 123f for "IEEE float" literals. i.e. the floats in play in Python right now. [...] So of course "F" is reasonable for fractions. But how hard does that make the grammar? Because the parser now has to grab the entire "1/3F" to construct the fraction. You can't just stick it in the lexer at that point.
I think it would be confusing if there were "f" for "float" and "F" for "fraction". How about "r" for "rationals"?
I'm good with 'r'.
--
Cameron Simpson