DIP 1026---Deprecate Context-Sensitive String Literals---Community Review Round 1

Elronnd elronnd at elronnd.net
Tue Dec 3 21:38:28 UTC 2019


On Tuesday, 3 December 2019 at 20:53:07 UTC, H. S. Teoh wrote:
>> *snipped various arguments to do with simplicity*
> Agreed, but that can't be the only criterion for removing a 
> feature. By the same argument, one could make the case for 
> removing templates from D. Bingo, the language instantly 
> becomes so much easier to parse! And it greatly simplifies the 
> compiler -- we can delete large sections of it, in fact! The 
> spec becomes simpler, D newbies don't need to learn this hard 
> template stuff anymore, and we can close all template-relateed 
> bugs, and tools become greatly simplified.

That's clearly not a fair comparison.  Heredocs can be reduced to 
a set of local transformations, while templates cannot.  This 
means: code using heredocs can be mechanically changed to not use 
them, and heredocs do not make the language more expressive.

>> If we don't want D support in syntax highlighters to be 
>> half-baked everywhere, keeping the lexical grammar simple is a 
>> good cause.
> IOW, implementators aren't competent enough to implement 
> something up to spec, therefore we should dumb down the spec 
> for their sake? Sounds like a backwards reason for doing 
> something.

The easier the language is to implement, the more implementors 
there will be.  If there are compelling reasons to include a 
language feature, and it makes implementation more difficult, it 
should be included regardless.  But that doesn't mean that ease 
of implementation should be completely ignored when considering 
language features.


More information about the Digitalmars-d mailing list