I was reading A Tour of Scala: Abstract Types. When is it better to use abstract types?
For example,
abstract class Buffer {
type T
val element: T
}
rather that generics, for example,
abstract class Buffer[T] {
val element: T
}
I was reading A Tour of Scala: Abstract Types. When is it better to use abstract types?
For example,
abstract class Buffer {
type T
val element: T
}
rather that generics, for example,
abstract class Buffer[T] {
val element: T
}