Dicebot on leaving D: It is anarchy driven development in all its glory.

Walter Bright newshound2 at digitalmars.com
Sat Aug 25 22:53:44 UTC 2018


On 8/25/2018 2:46 PM, David Nadlinger wrote:
> On Saturday, 25 August 2018 at 20:52:06 UTC, Walter Bright wrote:
>> If I fix the bug, I break existing code, and apparently a substantial amount 
>> of existing code. What's your advice on how to proceed with this?
> 
> At least for the transition period, I'd have attributes only apply to the 
> user-specified code and infer them for the actual full constructor. (We can 
> still print a deprecation warning if they don't match.) —David

Inferring is not good enough, for example:

https://github.com/dlang/dmd/pull/6816#issuecomment-307972790

There the @safe constructor is calling a destructor that calls free(). It can't 
be inferred as @safe. Sure, we can do warnings and deprecations, but the user 
will sooner or later have to change his code, and Chris' code from 2009 is not 
going to compile without changes.

---

A further issue with inferring for destructors is that why do it for destructors 
and not other member functions? It's a good question, without obvious answers.

---

The larger issue here is there is no solution where someone's ox doesn't get 
gored. I have to make a judgement call on what is overall best for the future of 
D. And the ox gets inevitably gored.

Even C, probably the slowest moving major language, has these issues.


More information about the Digitalmars-d mailing list