-> and :: operators

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 20:41:42 PDT 2015


These, of course, are C++ operators that are replace with the . operator 
in D. But when I translate C++ code to D, sometimes these operators get 
left behind, and sometimes I simply reflexively type them into D code.

The error message coming out of dmd could be better. I suggest 
recognizing -> and :: in the lexer, and saying something like:

    "The '->' operator is not in D, did you mean '.'?"

Anyone want to do a PR for this? (Should be pretty straightforward.)


More information about the Digitalmars-d mailing list