www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - phobos breakage... why?

reply "Adam D. Ruppe" <destructionator gmail.com> writes:
I was just playing with the beta, and got this among the
sea of errors:

arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == 
b",ubyte[],string).indexOf is deprecated


Why was that taken out? If you ask me, the root cause of D's
perceived stability problem has little to do with bugs. It
is 95% phobos devs removing functionality at random. Why do we
keep doing this?
Jul 25 2012
next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, July 25, 2012 19:24:05 Adam D. Ruppe wrote:
 I was just playing with the beta, and got this among the
 sea of errors:
 
 arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a ==
 b",ubyte[],string).indexOf is deprecated
 
 
 Why was that taken out? If you ask me, the root cause of D's
 perceived stability problem has little to do with bugs. It
 is 95% phobos devs removing functionality at random. Why do we
 keep doing this?
Andrei scheduled that for deprecation ages ago. It just wasn't actually deprecated when it was supposed to be. As the documentation says, the problem was that it was just too easily confused with std.string.indexOf which is subtlely different. countUntil is its replacement and has been around for quite some time. Just rename the function call, and it should work. - Jonathan M Davis
Jul 25 2012
prev sibling next sibling parent deadalnix <deadalnix gmail.com> writes:
Le 25/07/2012 19:24, Adam D. Ruppe a écrit :
 I was just playing with the beta, and got this among the
 sea of errors:

 arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a ==
 b",ubyte[],string).indexOf is deprecated


 Why was that taken out? If you ask me, the root cause of D's
 perceived stability problem has little to do with bugs. It
 is 95% phobos devs removing functionality at random. Why do we
 keep doing this?
The perfect illustration of the versionning thread concerns. Thank you for that.
Jul 25 2012
prev sibling next sibling parent reply "dnewbie" <run3 myopera.com> writes:
On Wednesday, 25 July 2012 at 17:24:06 UTC, Adam D. Ruppe wrote:
 I was just playing with the beta, and got this among the
 sea of errors:

 arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a == 
 b",ubyte[],string).indexOf is deprecated


 Why was that taken out? If you ask me, the root cause of D's
 perceived stability problem has little to do with bugs. It
 is 95% phobos devs removing functionality at random. Why do we
 keep doing this?
One of my programs stopped working in 2.060. It is *really* annoying when I see the message 'X is deprecated'.
Jul 25 2012
next sibling parent reply David Gileadi <gileadis NSPMgmail.com> writes:
On 7/25/12 10:36 AM, dnewbie wrote:
 One of my programs stopped working in 2.060. It is *really* annoying
 when I see the message 'X is deprecated'.
It might be nicer if you could say: deprecated("Use countUntil instead.") {...}
Jul 25 2012
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, July 25, 2012 10:55:53 David Gileadi wrote:
 On 7/25/12 10:36 AM, dnewbie wrote:
 One of my programs stopped working in 2.060. It is *really* annoying
 when I see the message 'X is deprecated'.
It might be nicer if you could say: deprecated("Use countUntil instead.") {...}
We want that feature. Daniel Murphy even partially implemented it, but he didn't finish it, so we don't have it yet. At this rate, by the time that we get it, Phobos won't be deprecating anything anymore. - Jonathan M Davis
Jul 25 2012
parent reply "Daniel Murphy" <yebblies nospamgmail.com> writes:
"Jonathan M Davis" <jmdavisProg gmx.com> wrote in message 
news:mailman.656.1343242698.31962.digitalmars-d puremagic.com...
 On Wednesday, July 25, 2012 10:55:53 David Gileadi wrote:
 It might be nicer if you could say:

 deprecated("Use countUntil instead.") {...}
We want that feature. Daniel Murphy even partially implemented it, but he didn't finish it, so we don't have it yet. At this rate, by the time that we get it, Phobos won't be deprecating anything anymore. - Jonathan M Davis
That's just not true. My pull request has been sitting there for 9 months. https://github.com/D-Programming-Language/dmd/pull/463
Jul 25 2012
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Thursday, July 26, 2012 14:08:00 Daniel Murphy wrote:
 "Jonathan M Davis" <jmdavisProg gmx.com> wrote in message
 news:mailman.656.1343242698.31962.digitalmars-d puremagic.com...
 
 On Wednesday, July 25, 2012 10:55:53 David Gileadi wrote:
 It might be nicer if you could say:
 
 deprecated("Use countUntil instead.") {...}
We want that feature. Daniel Murphy even partially implemented it, but he didn't finish it, so we don't have it yet. At this rate, by the time that we get it, Phobos won't be deprecating anything anymore. - Jonathan M Davis
That's just not true. My pull request has been sitting there for 9 months. https://github.com/D-Programming-Language/dmd/pull/463
Cool. The only pull request that I was aware of that you'd done was one that implemented more than the message stuff and altered how deprecated worked on some level, but it was decided not to change any of that. And at the time, I believe that you said that you didn't have time to redo it with just the message stuff. I had no idea that you'd done it. Too bad that it hasn't been merged. - Jonathan M Davis
Jul 25 2012
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
dnewbie:

 One of my programs stopped working in 2.060. It is *really* 
 annoying when I see the message 'X is deprecated'.
I have to maintain a good amount of D2 code now, and it's keeping around broken or badly designed stuff is far annoying. Bye, bearophile
Jul 25 2012
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, July 25, 2012 19:36:27 dnewbie wrote:
 On Wednesday, 25 July 2012 at 17:24:06 UTC, Adam D. Ruppe wrote:
 I was just playing with the beta, and got this among the
 sea of errors:
 
 arsd/cgi.d(898): Error: function std.algorithm.indexOf!("a ==
 b",ubyte[],string).indexOf is deprecated
 
 
 Why was that taken out? If you ask me, the root cause of D's
 perceived stability problem has little to do with bugs. It
 is 95% phobos devs removing functionality at random. Why do we
 keep doing this?
One of my programs stopped working in 2.060. It is *really* annoying when I see the message 'X is deprecated'.
If it makes you feel any better, the number of things getting deprecated has gone down considerably. Almost all of the changes related to deprecations in 2.060 are deprecated items being removed, not stuff being scheduled for deprecation or stuff being deprecated. Everything that was deprecated has been scheduled for deprecation and marked as such for _at least_ 6 months. _Most_ of it is stuff that was scheduled for deprecation a long time ago (years ago in some cases) but never actually deprecated (though it looks like some of that is missing from the changelog; I'll need to add it). I made an effort to clean up that stuff and got a good chunk of it taken care of for 2.060 (though unfortunately, not all of it). And with that taken care of and the number of items being scheduled for deprecation having been dropping off considerably, we should be approaching the point where only rare items get deprecated if even that. So, yes deprecations are annoying, and we were doing quite a few for a while as we cleaned a number of things up that needed cleaning up (a number of which were clamored for by those in the newsgroup - e.g. making the names of Phobos, functions consistent), but it's been tailing off and is approaching the point where it will be rare. - Jonathan M Davis
Jul 25 2012
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 7/25/12, Jonathan M Davis <jmdavisProg gmx.com> wrote:
 As the documentation says, the
 problem
 was that it was just too easily confused with std.string.indexOf which is
 subtlely different.
I've always wondered how it's different? Using countUntil on strings seems to work ok for me, or should I be using string.indexOf?
Jul 25 2012
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 7/25/2012 10:24 AM, Adam D. Ruppe wrote:
 Why was that taken out? If you ask me, the root cause of D's
 perceived stability problem has little to do with bugs. It
 is 95% phobos devs removing functionality at random. Why do we
 keep doing this?
For a relevant discussion: http://d.puremagic.com/issues/show_bug.cgi?id=6277
Jul 25 2012
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, July 25, 2012 11:52:51 Walter Bright wrote:
 On 7/25/2012 10:24 AM, Adam D. Ruppe wrote:
 Why was that taken out? If you ask me, the root cause of D's
 perceived stability problem has little to do with bugs. It
 is 95% phobos devs removing functionality at random. Why do we
 keep doing this?
For a relevant discussion: http://d.puremagic.com/issues/show_bug.cgi?id=6277
On a related note, we _really_ need to deprecate all of the stuff in the language that we've been saying for ages that we're getting rid of (e.g. scope variables, delete, the extra comparison operators, etc.). They're still listed in the docs, and people are still using them. The longer that they stay undeprecated, the more code that will break when we actually deprecate them. I'm definitely not arguing that they should be deprecated with this release (that would be obviously far too disruptive given that we've already started the beta process), but we really should try and get that taken care of for 2.061. - Jonathan M Davis
Jul 25 2012
parent reply "Daniel Murphy" <yebblies nospamgmail.com> writes:
"Jonathan M Davis" <jmdavisProg gmx.com> wrote in message 
news:mailman.659.1343243693.31962.digitalmars-d puremagic.com...
 On a related note, we _really_ need to deprecate all of the stuff in the
 language that we've been saying for ages that we're getting rid of (e.g. 
 scope
 variables, delete, the extra comparison operators, etc.). They're still 
 listed
 in the docs, and people are still using them. The longer that they stay
 undeprecated, the more code that will break when we actually deprecate 
 them.
 I'm definitely not arguing that they should be deprecated with this 
 release
 (that would be obviously far too disruptive given that we've already 
 started
 the beta process), but we really should try and get that taken care of for
 2.061.

 - Jonathan M Davis
A great start would be: https://github.com/D-Programming-Language/dmd/pull/697 (6 months)
Jul 25 2012
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Thursday, July 26, 2012 14:10:32 Daniel Murphy wrote:
 "Jonathan M Davis" <jmdavisProg gmx.com> wrote in message
 news:mailman.659.1343243693.31962.digitalmars-d puremagic.com...
 
 On a related note, we _really_ need to deprecate all of the stuff in the
 language that we've been saying for ages that we're getting rid of (e.g.
 scope
 variables, delete, the extra comparison operators, etc.). They're still
 listed
 in the docs, and people are still using them. The longer that they stay
 undeprecated, the more code that will break when we actually deprecate
 them.
 I'm definitely not arguing that they should be deprecated with this
 release
 (that would be obviously far too disruptive given that we've already
 started
 the beta process), but we really should try and get that taken care of for
 2.061.
 
 - Jonathan M Davis
A great start would be: https://github.com/D-Programming-Language/dmd/pull/697 (6 months)
Yeah. And as I recall, you posted a great list of the language stuff that needed to be deprecated several months back, and that never went anywhere either. I don't know why none of this stuff has been taken care of (especially when there are pull requests for at least some of it). I know that Walter hates deprecating stuff, because it disrupts users, but this is stuff that he agreed on, and the longer that we wait, the more disruptive it will be. - Jonathan M Davis
Jul 25 2012
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, July 25, 2012 20:14:06 Andrej Mitrovic wrote:
 On 7/25/12, Jonathan M Davis <jmdavisProg gmx.com> wrote:
 As the documentation says, the
 problem
 was that it was just too easily confused with std.string.indexOf which is
 subtlely different.
I've always wondered how it's different? Using countUntil on strings seems to work ok for me, or should I be using string.indexOf?
code units vs code points. string.indexOf will give you the number of code units std.algorithm.countUntil will give you the number of code points All it takes is having imported std.algorithm and std.string, and you could be getting a function which is doing completely the wrong thing for your code. That's why it was changed. - Jonathan M Davis
Jul 25 2012