On Friday, 9 October 2015 at 03:41:42 UTC, Walter Bright wrote:
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.)

Too late to change but wouldn't it be better to have one operator for members and another for UFCS? '->' would be good for UFCS.

Reply via email to