DIP 1026---Deprecate Context-Sensitive String Literals---Community Review Round 1
SeeWebsiteForEmail at erdani.org
Wed Dec 4 21:57:00 UTC 2019
On 12/3/19 5:11 PM, Dennis wrote:
> What criteria should a language feature have to be candidate for
> removal, and why don't context-sensitive string literals fit those
> criteria? What sources of language complexity can be removed instead?
That got me thinking. Here's what I'd opine.
A good DIP creates a scientific argument. It would have the general
attitude of building, through a series of factual statements, a
hypothesis that is convincing. A neutral person with the proper
background would read the facts and reach the conclusion as much as the
author. (In contrast, a DIP that is not scientific would attempt to use
qualitative arguments and rhetoric in an attempt to create an opinion
Consider someone reads a DIP proposing the removal of here docs
containing facts such as these:
* "We have analyzed x languages and of these, we found y historical
issues related to mistaken or poor performance implementation of
heredocs. [... details ...]"
* "Across x editors, we discovered that x1 do not implement here docs
for any of their supported languages, x2 do not implement them for D,
and x3 implement them with severe performance bottlenecks. [... details
" "In the D compiler issue, we found x bug reports issued over y years.
They took z days on average to fix. x1 issues are still open. [...
* "The code dedicated to heredocs in the D reference parser is y lines
long, which constitutes z% of the entire lexer. Lexing of heredocs is t%
slower than any other equivalent strings, revealing a serious
performance bottleneck. [... details ...]"
With such arguments at hand, a proposal would build a powerful argument
that anyone can easily verify and take into consideration. No need for
argumentation, explanations, etc. Conversely, if one does such an
investigation and gets no meaningful results, the conclusion that
heredocs are okay as they are would also be immediate.
Now it may be argued that all of this is hard work, and of high risk -
even if the DIP is well-argued, it could be rejected. Also, is the
result of the work (a small language simplification) worth the effort?
Sadly I know of no solution to this. What I can say is that it's the
main dilemma tormenting graduate students doing research. A colleague of
mine in the PhD program said he has any number of ideas to research, but
the cognitive load of putting work into something that may not pan out
is paralyzing him, so he ends up doing nothing for long periods of time.
He ended up not finishing his degree. For all I know he was smarter and
better than many who did graduate.
More information about the Digitalmars-d