The Case Against Autodecode

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 2 08:02:13 PDT 2016


On 06/02/2016 10:14 AM, jmh530 wrote:
> However, the case against autodecoding is clearly popular. At a minimum,
> it has resulted in a significant amount of time dedicated to forum
> discussion and has made you metaphorically angry at Walter. Resources
> spent grumbling about it could be better spent elsewhere.

Yah, this is a bummer and one of the larger issues of our community: 
there's too much talking about doing things and too little doing things. 
On one hand I want to empower people (as I said at DConf: please get me 
fired!), and on the other I need to prevent silly things from happening. 
The quality of some of the code that gets into Phobos when I look the 
other way is sadly sub-par. Cumulatively that has reduced its quality 
over time. That (improving the time * talent torque) is the real 
solution to Phobos' technical debt, of which autodecoding is negligible.

> One way to deal with the problem of scarce resources is by reducing the
> cost of whatever action you want to take. For instance, Adam Ruppe just
> put up a good post in the Dealing with Autodecode thread
> https://forum.dlang.org/post/ksasfwpuvpwxjfniupiv@forum.dlang.org
> noting that a compiler switch could easily be added to phobos. Combined
> with a long deprecation timeline, the cost that it would impose on D
> users who are not active forum members and might want to complain about
> the issue would be relatively small.

This is a very costly solution to a very small problem. I'm here to 
prevent silly things like this from happening and from bringing back 
perspective. We've had huge issues with language changes that were much 
more important and brought much less breakage. The fact that people talk 
about 132 breakages in Phobos with a straight face is a good sign that 
the heat of the debate has taken perspective away. I'm sure it will come 
back in a few weeks. Just need to keep the dam until then.

The real ticket out of this is RCStr. It solves a major problem in the 
language (compulsive GC) and also a minor occasional annoyance 
(autodecoding). This is what I need to work on, instead of writing long 
messages to put back sense into people.

Many don't realize that the only reason current strings ever work in 
safe code is because of the GC. char[] is too little encapsulation, so 
it needs GC as a crutch to be safe. That's the problem with D's strings, 
not autodecoding. That's why we need to change things. That's what keeps 
me awake at night.



Andrei


More information about the Digitalmars-d mailing list