a**b exponentiation
Deewiant
deewiant.doesnotlike.spam at gmail.com
Mon Jul 2 05:35:32 PDT 2007
Chris Nicholson-Sauls wrote:
> Deewiant wrote:
>> We have precedent for the problem of a**b: we already have ++a and a++,
>> both of which can lead to similar problems. What does "a+++b" mean?
>> Possibilities are "a++ + b" and "a + ++b". Also, "a++b" can be "a + +b",
>> but parses as "a++ b", a syntax error.
>
> This is at least predictable because of the compiler's "maximal munch"
> policy: always grab the biggest hunk of source you can at one time.(The
> 'a+++b' example would parse as 'a++ +b'.)
>
It's predictable, yes, but it's still not clear. a**b would also be predictable
as meaning a ** b, not a * *b.
More information about the Digitalmars-d
mailing list