This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Please stop removing methods without at least deprecating them

10 replies
David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Folks,

List.firstOption (the preferred method for getting the first element of a List in 2.7.7) was deprecated in 2.8-BetaRC1.

Now, List.firstOption is gone.  In its place, is List.headOption, which was deprecated in 2.7.7.

I understand making the decision to move from firstOption to headOption, but pulling the preferred 2.7.7 method makes porting a bear and if we wind up keeping a parallel set of Lift builds for 2.7.x and 2.8.x, it's a nightmare.

So, please respect the deprecation process.

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Please stop removing methods without at least deprecating t

On Wed, Nov 18, 2009 at 07:35:27PM -0800, David Pollak wrote:
> List.firstOption (the preferred method for getting the first element
> of a List in 2.7.7) was deprecated in 2.8-BetaRC1.

Any errors here are mine. I'm working from jorge's deprecation
spreadsheet but unfortunately the way it appears on my screen has two
decontextualized versions side by side -- one when it was introduced and
one when it was deprecated. It's pretty easy to mix them up during
"deprecation hour fifteen" or wherever I was at that point. I'll review
my recent changes.

> So, please respect the deprecation process.

Nobody's disrespecting the deprecation process, it's just a mistake.

David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Please stop removing methods without at least deprecating


On Wed, Nov 18, 2009 at 8:23 PM, Paul Phillips <paulp@improving.org> wrote:
On Wed, Nov 18, 2009 at 07:35:27PM -0800, David Pollak wrote:
> List.firstOption (the preferred method for getting the first element
> of a List in 2.7.7) was deprecated in 2.8-BetaRC1.

Any errors here are mine.  I'm working from jorge's deprecation
spreadsheet but unfortunately the way it appears on my screen has two
decontextualized versions side by side -- one when it was introduced and
one when it was deprecated.  It's pretty easy to mix them up during
"deprecation hour fifteen" or wherever I was at that point.  I'll review
my recent changes.

Thanks for all you do!
 

> So, please respect the deprecation process.

Nobody's disrespecting the deprecation process, it's just a mistake.

Sorry for being snarky.
 

--
Paul Phillips      | We must respect the other fellow's religion, but only
Caged Spirit       | in the sense and to the extent that we respect his
Empiricist         | theory that his wife is beautiful and his children smart.
i'll ship a pulp   |     -- H. L. Mencken



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
Stepan Koltsov
Joined: 2008-12-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Please stop removing methods without at least deprecating

On Thu, Nov 19, 2009 at 06:35, David Pollak
wrote:
>
> List.firstOption (the preferred method for getting the first element of a
> List in 2.7.7) was deprecated in 2.8-BetaRC1.
>
> Now, List.firstOption is gone.  In its place, is List.headOption, which was
> deprecated in 2.7.7.
>
> I understand making the decision to move from firstOption to headOption, but
> pulling the preferred 2.7.7 method makes porting a bear and if we wind up
> keeping a parallel set of Lift builds for 2.7.x and 2.8.x, it's a nightmare.
>
> So, please respect the deprecation process.

BTW,

"head" is a strange name for the method that gets "first" element,
whereas "last" element get method is "last". It is inconsistent.

Seems like one of many "Traversable" implementations — "List" —
dictates "Traversable" method names.

S.

Jorge Ortiz
Joined: 2008-12-16,
User offline. Last seen 29 weeks 4 days ago.
Re: Please stop removing methods without at least deprecating
I agree. The head/first debate waged back in force between the needs of RandomAccessSeq and the needs of List.

Now that we have a proper separation of responsibilities in LinearSeq and IndexedSeq, maybe the first can have head/tail and the second can have first/last? (Where "last" indicates xs(xs.size - 1), not a synonym for "tail").

That leaves the question of what to do with Seq and Iterable... For which I'll admit I don't have a good answer.

--j

On Wed, Nov 18, 2009 at 8:25 PM, Stepan Koltsov <stepan.koltsov@gmail.com> wrote:
On Thu, Nov 19, 2009 at 06:35, David Pollak
<feeder.of.the.bears@gmail.com> wrote:
>
> List.firstOption (the preferred method for getting the first element of a
> List in 2.7.7) was deprecated in 2.8-BetaRC1.
>
> Now, List.firstOption is gone.  In its place, is List.headOption, which was
> deprecated in 2.7.7.
>
> I understand making the decision to move from firstOption to headOption, but
> pulling the preferred 2.7.7 method makes porting a bear and if we wind up
> keeping a parallel set of Lift builds for 2.7.x and 2.8.x, it's a nightmare.
>
> So, please respect the deprecation process.

BTW,

"head" is a strange name for the method that gets "first" element,
whereas "last" element get method is "last". It is inconsistent.

Seems like one of many "Traversable" implementations — "List" —
dictates "Traversable" method names.


S.

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Please stop removing methods without at least deprecating

On Thu, Nov 19, 2009 at 5:45 PM, Jorge Ortiz wrote:
> I agree. The head/first debate waged back in force between the needs of
> RandomAccessSeq and the needs of List.
>
> Now that we have a proper separation of responsibilities in LinearSeq and
> IndexedSeq, maybe the first can have head/tail and the second can have
> first/last? (Where "last" indicates xs(xs.size - 1), not a synonym for
> "tail").
>
> That leaves the question of what to do with Seq and Iterable... For which
> I'll admit I don't have a good answer

I think it's better to be consistent across classes. I want to avoid
where possible two operations that are exactly the same yet have
different names.

ijuma
Joined: 2008-08-20,
User offline. Last seen 22 weeks 2 days ago.
Re: Please stop removing methods without at least deprecating t

On Thu, 2009-11-19 at 17:56 +0100, martin odersky wrote:
> I think it's better to be consistent across classes. I want to avoid
> where possible two operations that are exactly the same yet have
> different names.

I agree.

Ismael

Viktor Klang
Joined: 2008-12-17,
User offline. Last seen 1 year 27 weeks ago.
Re: Please stop removing methods without at least deprecating


On Thu, Nov 19, 2009 at 5:45 PM, Jorge Ortiz <jorge.ortiz@gmail.com> wrote:
I agree. The head/first debate waged back in force between the needs of RandomAccessSeq and the needs of List.

Now that we have a proper separation of responsibilities in LinearSeq and IndexedSeq, maybe the first can have head/tail and the second can have first/last? (Where "last" indicates xs(xs.size - 1), not a synonym for "tail").

This may be a daft question, but what's the difference in concept between IndexedSeq and Map[Int,T]? 

That leaves the question of what to do with Seq and Iterable... For which I'll admit I don't have a good answer.

--j

On Wed, Nov 18, 2009 at 8:25 PM, Stepan Koltsov <stepan.koltsov@gmail.com> wrote:
On Thu, Nov 19, 2009 at 06:35, David Pollak
<feeder.of.the.bears@gmail.com> wrote:
>
> List.firstOption (the preferred method for getting the first element of a
> List in 2.7.7) was deprecated in 2.8-BetaRC1.
>
> Now, List.firstOption is gone.  In its place, is List.headOption, which was
> deprecated in 2.7.7.
>
> I understand making the decision to move from firstOption to headOption, but
> pulling the preferred 2.7.7 method makes porting a bear and if we wind up
> keeping a parallel set of Lift builds for 2.7.x and 2.8.x, it's a nightmare.
>
> So, please respect the deprecation process.

BTW,

"head" is a strange name for the method that gets "first" element,
whereas "last" element get method is "last". It is inconsistent.

Seems like one of many "Traversable" implementations — "List" —
dictates "Traversable" method names.


S.




--
Viktor Klang
| "A complex system that works is invariably
| found to have evolved from a simple system
| that worked." - John Gall

Blog: klangism.blogspot.com
Twttr: twitter.com/viktorklang
Code: github.com/viktorklang
Stepan Koltsov
Joined: 2008-12-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Please stop removing methods without at least deprecating

On Thu, Nov 19, 2009 at 20:09, Ismael Juma wrote:
> On Thu, 2009-11-19 at 17:56 +0100, martin odersky wrote:
>> I think it's better to be consistent across classes. I want to avoid
>> where possible two operations that are exactly the same yet have
>> different names.
>
> I agree.

List.head should be renamed to List.first then (although it is unusual
for most functional programmers).

S.

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Please stop removing methods without at least deprecating

On Thu, Nov 19, 2009 at 10:21 PM, Stepan Koltsov
wrote:
> On Thu, Nov 19, 2009 at 20:09, Ismael Juma wrote:
>> On Thu, 2009-11-19 at 17:56 +0100, martin odersky wrote:
>>> I think it's better to be consistent across classes. I want to avoid
>>> where possible two operations that are exactly the same yet have
>>> different names.
>>
>> I agree.
>
> List.head should be renamed to List.first then (although it is unusual
> for most functional programmers).
>
Yeah, right. -- Martin

Tony Morris 2
Joined: 2009-03-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Please stop removing methods without at least deprecating

FYI 'first' is a well-recognised Arrow function.

http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf

Stepan Koltsov wrote:
> On Thu, Nov 19, 2009 at 20:09, Ismael Juma wrote:
>
>> On Thu, 2009-11-19 at 17:56 +0100, martin odersky wrote:
>>
>>> I think it's better to be consistent across classes. I want to avoid
>>> where possible two operations that are exactly the same yet have
>>> different names.
>>>
>> I agree.
>>
>
> List.head should be renamed to List.first then (although it is unusual
> for most functional programmers).
>
> S.
>
>

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland