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

Inconsistent symbol when explaining types

2 replies
loverdos
Joined: 2008-11-18,
User offline. Last seen 2 years 27 weeks ago.

Hi all,

I noticed that when explaining types with -explaintypes, then the
symbol < instead of the usual <: is used for subtyping.

I propose to change that to <: for consistency. I have tracked the
change at line 534 of Types.scala, so that explain("<", isSubType,
this, that) becomes explain("<:", isSubType, this, that).

If this is OK, since my compiler-fu is very low and innocent-looking
things are sometimes the most dangerous, I am asking if the change
above is safe.

I could commit the change myself, open a ticket just to have this
trac(k)ed and backport it to 2.7[1] for uniformity.

Christos

[1] What svn branch might that be?

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Inconsistent symbol when explaining types

On Sun, Oct 18, 2009 at 1:33 PM, Christos KK Loverdos
wrote:
> Hi all,
>
> I noticed that when explaining types with -explaintypes, then the symbol <
> instead of the usual <: is used for subtyping.
>
> I propose to change that to <: for consistency. I have tracked the change at
> line 534 of Types.scala, so that explain("<", isSubType, this, that) becomes
> explain("<:", isSubType, this, that).
>
> If this is OK, since my compiler-fu is very low and innocent-looking things
> are sometimes the most dangerous, I am asking if the change above is safe.
>
> I could commit the change myself, open a ticket just to have this trac(k)ed
> and backport it to 2.7[1] for uniformity.
>
No need to do that. I just did the change in my copy of Types.scala. I
don't think this is a case for backporting though.

Cheers

loverdos
Joined: 2008-11-18,
User offline. Last seen 2 years 27 weeks ago.
Re: Inconsistent symbol when explaining types

On Oct 18, 2009, at 22:19, martin odersky wrote:

> On Sun, Oct 18, 2009 at 1:33 PM, Christos KK Loverdos
> wrote:
>> Hi all,
>>
>> I noticed that when explaining types with -explaintypes, then the
>> symbol <
>> instead of the usual <: is used for subtyping.
>>
>> I propose to change that to <: for consistency. I have tracked the
>> change at
>> line 534 of Types.scala, so that explain("<", isSubType, this,
>> that) becomes
>> explain("<:", isSubType, this, that).
>>
>> If this is OK, since my compiler-fu is very low and innocent-
>> looking things
>> are sometimes the most dangerous, I am asking if the change above
>> is safe.
>>
>> I could commit the change myself, open a ticket just to have this
>> trac(k)ed
>> and backport it to 2.7[1] for uniformity.
>>
> No need to do that. I just did the change in my copy of Types.scala. I
> don't think this is a case for backporting though.
>
OK, thank you Martin.

I do not recall the requirements for backporting right now, but I
stumbled across that when explaining something in the book, whose code
is mostly written under 2.7, so I thought it would be nice to have the
change back to 2.7 as well. Just for uniformity.

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