Deprecated Library Functions / Methods

Dmitry Olshansky dmitry.olsh at gmail.com
Fri Nov 30 10:26:15 PST 2012


11/30/2012 9:27 PM, Chris пишет:
> There have been quite a few changes since 2.051 and I cannot stick to
> that version, because I would introduce more deprecated code. I wanted
> to update my code but saw in the library that again loads of methods
> were scheduled for deprecation. So what's the point?
>

Java has plenty deprecated stuff. So does *cough* php. So do other 
languages. That alone is not an indication of anything except of the 
on-going development. There are always references to (usually) better 
replacements.

There are still cases of simple renaming  to make functions follow the 
convention, but these ones are easily fixed with find/replace.

> Changes are necessary and I think they are reasonable (like the regex
> algorithm), but as a developer who uses D, you need some sort of
> security, i.e. that your code won't break in a few months' time. I
> really appreciate the fantastic work on D, but sometimes it seems to me
> like a "code laboratory" where programmers test certain ideas,
> algorithms, approaches etc, which would be fine for a college project.
> But if you have to use and work with the library to develop real world
> applications, it's a nightmare.

I'd just keep certain version of the compiler & phobos + libs that are 
needed. And then when deadlines are passed do some refactoring/tweaking 
to bump used versions up a notch. I agree that it's far from ideal.

> If this doesn't change, I fear D will
> never take off. Most frameworks at least "tolerate" deprecated functions
> until developers have time to update their code.
>

The deprecated APIs do still work if you use the -d switch. What is far 
more shattering are compiler changes (and bugfixes, sadly) given that 
2.051 is 9 versions behind he latest it won't surprise me that it breaks 
a _lot_.

 > Most frameworks at least "tolerate" deprecated functions
 > until developers have time to update their code.

Problem is these frameworks also have certain version requirement last 
time I checked it goes like this: requires  php 5.3+ or say python 2.5+ 
  etc.

So we'd better have certain D versions that are more lasting. But 
that'll make sense once the feature set is fully implemented and polished.

Anyway see D stable topic.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list