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

Scala traits and Brian Goetz's 'extension methods'

1 reply
Will Crozier
Joined: 2011-12-03,
User offline. Last seen 42 years 45 weeks ago.

Hi,

I'm just beginning to learn Scala and following its progress with
enthusiasm. Since binary compatibility appears to be a concern across
releases of Scala I was interested to read Martin mention [1] that
Brian Goetz's 'public defender' methods proposal (and the necessary
JVM changes) comes "tantalizingly close", but not quite there, towards
solving issues with library traits and binary compatibility.

Given that Brian is now releasing drafts of his prototype proposal
[2], can anyone explain if it is likely to go far enough to benefit
Scala or to give a brief overview of what would be needed so that
Scala would get the benefits that Martin mentioned in that InfoQ
interview? I am nowhere near understanding that paper!

Is any discussion going on between Typesafe guys and Brian et al at
Oracle? It'd be great if the final proposal could give Scala some
benefit but I don't see much talk of Scala or other JVM languages on
the lamda-dev list for a long time now. Has the 'ship sailed' already
on this chance for extra VM support for traits?

cheers,

Will Crozier

[1] http://www.infoq.com/interviews/martin-odersky-scala-future

[2] http://hg.openjdk.java.net/lambda/defender-prototype/raw-file/f49be48f12...

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Scala traits and Brian Goetz's 'extension methods'


On Sat, Dec 3, 2011 at 8:16 PM, Will Crozier <willjcroz [at] gmail [dot] com> wrote:
Hi,

I'm just beginning to learn Scala and following its progress with
enthusiasm. Since binary compatibility appears to be a concern across
releases of Scala I was interested to read Martin mention [1] that
Brian Goetz's 'public defender' methods proposal (and the necessary
JVM changes) comes "tantalizingly close", but not quite there, towards
solving issues with library traits and binary compatibility.

Given that Brian is now releasing drafts of his prototype proposal
[2], can anyone explain if it is likely to go far enough to benefit
Scala or to give a brief overview of what would be needed so that
Scala would get the benefits that Martin mentioned in that InfoQ
interview? I am nowhere near understanding that paper!

Is any discussion going on between Typesafe guys and Brian et al at
Oracle? It'd be great if the final proposal could give Scala some
benefit but I don't see much talk of Scala or other JVM languages on
the lamda-dev list for a long time now. Has the 'ship sailed' already
on this chance for extra VM support for traits?

I am talking to Brian. So far, it does not look like extension methods can accommodate traits because they do not cater for traits overriding class methods. I do not have the time to read or post to lambda-dev. But it other Scala people could do it, that could be very helpful!
Cheers
 -- Martin 

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