proposal: heredoc comments to allow `+/` in comments, eg from urls or documented unittests

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Mon Feb 12 01:05:37 UTC 2018


On 02/10/2018 06:03 PM, Walter Bright wrote:
> 
> There isn't any commenting scheme that won't trip you up with certain 
> characters 

That's exactly the whole point of heredocs ever existing in the first 
place, its exactly the problem they're created for.

> in the comments. I don't see a compelling case for adding 
> another kind of comment.
>

That's the same exact reason most languages don't have most of the nice 
things in D, like separators for numeric literals: Because they're not 
strictly necessary. But if D had never been willing to improve the state 
of the art by not being afraid of "not stricktly necessary" features, 
very few of us would have ever had reson to come onboard with D in the 
first place. And yes, I know D's not at that point any more. And that's 
one of my biggest dissapointments with D.

> Vladimir's suggestion to use %2B instead of + seems to resolve this 
> adequately.

Only for URLs. "URLs" was just one example of a language that can leas 
to trouble.


More information about the Digitalmars-d mailing list