Beyond Scala 2.8 - A Roadmap
scala-lang.org
scala-lang.org
Check out the presentation from Scala Days 2010: http://days2010.scala-lang.org/node/138/140
trait X {
trait A { type T >: Int <: Int }
val x : A
var n : x.T = 3
}
trait Y extends X {
trait B { type T >: String <: String }
lazy val x : A with B = x
n = "foo"
}
new Y {}
I just used this because it is extremely simple and is just the tip of the iceberg. It is possible to exploit this in much more interesting ways and dangerous ways, but those are less concise.It is worth noting that this is not just a simple compiler bug, but a deep flaw in the way type members and type composition interact.
Seems this depends on path-dependent types (x.T in the example) ?
Do you think it's possible to fix the type system to avoid this without throwing away large parts of it?
Is there are a relevant scala trac ticket?
I'd really recommend you try Intellij 9.0.3, it's improved from Intellij 8, and is wildly better than what Eclipse offers.
On another note, I don't believe that plugins for IDEs should necessarily be contributed by the 'core' Scala team. It makes more sense to me that people closer to the IDE in question are in a better position to write effective plugins. The Intellij plugin was written internally by Intellij and is perfectly usable in my opinion. Interestingly they've made the choice of not using the Scala compiler for syntax highlighting/error marking etc. which (again) in my opinion is a better choice than tieing this into the compiler.