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

what's wrong with --?

5 replies
H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.

i noticed that -- is deprecated:
@deprecated("use `list1 filterNot (list2 contains)` instead")

but why? what's wrong with --? it's short, and it's clear what it does

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: what's wrong with --?

On Thu, Jul 29, 2010 at 09:10:03PM +0200, HamsterofDeath wrote:
> i noticed that -- is deprecated:
> @deprecated("use `list1 filterNot (list2 contains)` instead")
>
> but why? what's wrong with --? it's short, and it's clear what it does

I do not know, but after following a half dozen irrelevant changes I
tracked it to this commit:

http://lampsvn.epfl.ch/trac/scala/changeset/16738

The commit message "updates to scalax collections and standard library
classes" is less than revealing, but maybe you can infer the reasoning
from the rest of the patch.

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: what's wrong with --?
H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.
Re: what's wrong with --?

i see. is the method going to be removed or fixed? i'm fine with
removing the first (and only) occurences, so i'd like to keep the --

Am 29.07.2010 22:00, schrieb martin odersky:

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: what's wrong with --?

On Thu, Jul 29, 2010 at 10:06 PM, HamsterofDeath wrote:
>  i see. is the method going to be removed or fixed? i'm fine with
> removing the first (and only) occurences, so i'd like to keep the --
>
I think the intention is to remove, because with --, you;d also expect
++, -, and + to work
and List#+ was alaso removed because of its strange interactions with String#+.

Cheers

H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.
Re: what's wrong with --?

Am 29.07.2010 22:13, schrieb martin odersky:
> On Thu, Jul 29, 2010 at 10:06 PM, HamsterofDeath wrote:
>> i see. is the method going to be removed or fixed? i'm fine with
>> removing the first (and only) occurences, so i'd like to keep the --
>>
> I think the intention is to remove, because with --, you;d also expect
> ++, -, and + to work
> and List#+ was alaso removed because of its strange interactions with String#+.
>
> Cheers
>

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