Interesting user mistake

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 4 05:02:26 PDT 2015


On 9/3/15 5:59 PM, Brian Schott wrote:
> On Thursday, 3 September 2015 at 17:17:26 UTC, Steven Schveighoffer wrote:
>> What about all other operations that may be typos from op= where op is
>> also a unary operator? e.g. =-
>
> We'd have to special-case '*':
>
> a=*b;
>

You could say the same thing for =-:

a=-b;

seems reasonable for someone who doesn't like whitespace. I think 
Andrei's rule was the token sequence must have whitespace after the 
operator in order to be rejected. So the above would be fine.

-Steve


More information about the Digitalmars-d mailing list