Oliver Hoog wrote: > Since one of D's goals is dropping the bad things from C/C++, I wonder > why the ambiguous syntax for multi-line comments is still allowed: > --- > auto p = new int; > *p = 10; > auto j = 100/*p; <- error > --- > There is already the unambiguous /+...+/ syntax, so why not drop the > /*...*/ syntax? Compatibility? Convenience? I think D should be more > pragmatic. > What do you think?
It's not ambiguous. Tokens are matched with maximal munch meaning that /* is ALWAYS the opening of a multi-line comment.
