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

Exil Exil at gmall.com
Wed Dec 4 04:17:25 UTC 2019


On Tuesday, 3 December 2019 at 19:42:12 UTC, Andrei Alexandrescu 
wrote:
> On 12/3/19 9:45 AM, Dennis wrote:
>> On Tuesday, 3 December 2019 at 12:38:29 UTC, Andrei 
>> Alexandrescu wrote:
>>> Waste of labor is sadly a common theme in our community.
>> 
>> I consider this low-hanging fruit: just deprecating a token 
>> takes little implementation effort, and reduction in language 
>> complexity is (as far as I know) always welcome
>
> These can never be the primary reasons for removing a feature. 
> One doesn't remove a feature because it's easy to remove. One 
> removes a feature because there are good reasons to remove it, 
> and as perks we get simplification of the language and maybe 
> it's easy to remove.

C++ removed features that were almost never used. So much so I 
don't even remember what they were called. This is a D feature I 
never knew existed. It does make it simpler and I'd argue for 
removing it entirely rather than adding replacements for it.

>> In this case, such tools would be syntax highlighters.
>
> The entire narrative of the DIP puts CFG front and center. 
> Reader's first thought is, "wait, the author is confused about 
> what a CFG is."
>
> FIRST sentence in the abstract: "D is intended to have a 
> context-free grammar..."
>
> FIRST paragraph in the rationale: "Regarding language design, 
> Walter Bright has stated: [... CFG stuff ...]"
>
> Even the "Grammar Changes" section should be a give-away: the 
> diff proposed is in the LEXICAL definition 
> (https://dlang.org/spec/lex.html), not in the GRAMMAR 
> definition (https://dlang.org/spec/grammar.html).
>
> If syntax highlighters are the primary reason for the DIP, it 
> should be the primary reason in the DIP. The entire rationale 
> needs to be redone. There should be an enumeration of syntax 
> highlighters along with their success/failure of implementing 
> heredocs. (Didn't test all but far as I can tell I've never 
> heard of difficulties with implementing heredocs for bash, perl 
> and the like.)

The tools for IDEs, I'd argue auto complete is probably the most 
useful tool an IDE has. You can't implement it without basically 
having the entire front end of the compiler because of CTFE. Its 
so complicated in fact that there are no tools for D that 
support. Ice seen some incorrect syntax highlighting for D but I 
think it was specifically cause by q{} which this doesn't remove 
anyways.

>> Maybe you don't care about syntax highlighting, but please 
>> judge this DIP by its own merits and not compared to potential 
>> other DIPs that you care more about.
>
> A DIP ought to be judged by reading the DIP. This DIP is ill 
> informed because it is built around the CFG argument, a 
> non-existing issue. If the DIP requires a forum post explaining 
> how it needs to be judged, that's a problem with the DIP, not 
> the reader.

DIP1021. If the D federation leadership holds itself to that kind 
of standard, I don't see why anyone should expect them to hold 
someone else to a standard above and beyond their own.



More information about the Digitalmars-d mailing list