yep. When I first tasted Scala it seemed great, but the having abstractions that leak less (haskell) is something I really appreciate.
And there's something about Scala using traits for everything that rubs me the wrong way.
Stuff like this I still find odd, mixing abstract classes with functions and inheritance.
abstract class IntSeqBuffer extends SeqBuffer {
type U = Int
}
object AbstractTypeTest1 extends App {
def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =
new IntSeqBuffer {
type T = List[U]
val element = List(elem1, elem2)
}
val buf = newIntSeqBuf(7, 8)
}
Comments
yep. When I first tasted Scala it seemed great, but the having abstractions that leak less (haskell) is something I really appreciate.
And there's something about Scala using traits for everything that rubs me the wrong way.
Stuff like this I still find odd, mixing abstract classes with functions and inheritance.