if(arr) now a warning
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri May 1 02:55:00 PDT 2015
On 5/1/2015 2:28 AM, Vladimir Panteleev wrote:
> I was in the "break my code" camp for a long time, but this has gradually
> changed as the amount of D code I've written grew. Let me tell you, it's totally
> not fun when you need to quickly fix a D program you wrote 3 years ago because
> something is on fire and it needs fixing now, and discover you have to make a
> bunch of changes just to get it to compile again. The alternative is using an
> older compiler, and DVM helps with that - but this doesn't work if the fix is in
> a library which is not compatible with older compiler versions.
I've had the mispleasure several times of reaching back to update some older D
code of mine, that works fine, and finding not only will it not compile, I have
to re-architect parts of it.
The situation was so bad I wound up creating:
https://github.com/DigitalMars/undeaD
and if *I* find this annoying, irritating, disheartening, etc., I can only
imagine how others feel about it.
Sometimes the older code is complex, underdocumented, and I don't remember how
it worked or how it needs to be re-architected. But it does work, it just
doesn't compile anymore.
Imagine you find some cool D library, download it, and find it doesn't compile.
How many of you are going to fix it? Or are you just going to chuck it to /dev/null?
How many users have we lost because of this?
This really blows. And things like that isnan => isNaN really has GOT TO STOP.
Just today I found it broke some older piece of code I had that's perfectly correct.
We need to be working on things that MATTER. What happens with every Reddit post
about D? No matter the topic, it always becomes about D not being usable without
the GC.
A big piece of the fix for that is going through Phobos and fixing code that
returns gc allocated arrays with algorithms that return ranges.
Why am I the only one working on that? I don't remember anyone having a problem
with isnan.
I'm willing to break existing code for a large benefit. Not a small one. And
certainly not when the benefit is zero, like the isnan renaming. And I'm willing
to break code that relied on bugs in the compiler.
More information about the Digitalmars-d
mailing list