Interesting user mistake

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 3 15:14:23 PDT 2015


On Thu, Sep 03, 2015 at 09:59:52PM +0000, Brian Schott via Digitalmars-d 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;

Not if we also look for whitespace after the '*'.

But then applying the same rule to + would cause us to miss cases like
a=+b while catching a =+ b.


T

-- 
Latin's a dead language, as dead as can be; it killed off all the Romans, and now it's killing me! -- Schoolboy


More information about the Digitalmars-d mailing list