proposal: heredoc comments to allow `+/` in comments, eg from urls or documented unittests
ag0aep6g
anonymous at example.com
Sun Feb 11 11:41:25 UTC 2018
On 02/11/2018 09:32 AM, Vladimir Panteleev wrote:
> This syntax is syntactically ambiguous.
[...]
> assert(StringNumber("4")/"2" == "2"); // Conflict!
> // Division by string, or nested comment?
Strictly, it's not worse than `/*`, is it?
----
assert(4/*(new int(2)) == 2);
// Division by dereferenced pointer or comment?
----
I.e., it's a comment and you have to add a space to make it division.
But `/"` would break existing code, of course.
More information about the Digitalmars-d
mailing list