- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Scala traits and Brian Goetz's 'extension methods'
Sat, 2011-12-03, 20:16
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...









On Sat, Dec 3, 2011 at 8:16 PM, Will Crozier <willjcroz [at] gmail [dot] com> wrote:
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