- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Please stop removing methods without at least deprecating them
Thu, 2009-11-19, 04:35
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
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
Thu, 2009-11-19, 05:27
#2
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
Thu, 2009-11-19, 05:37
#3
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.
Thu, 2009-11-19, 17:57
#4
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:
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.
Thu, 2009-11-19, 18:07
#5
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.
Thu, 2009-11-19, 18:27
#6
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
Thu, 2009-11-19, 20:17
#7
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
Thu, 2009-11-19, 22:27
#8
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.
Thu, 2009-11-19, 22:37
#9
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
Thu, 2009-11-19, 22:47
#10
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.
>
>
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.