abstract-type
Is there example of scala abstract type usage which is impossible to achieve with generics?
There are two possible way to express abstraction over types. abstract class Buffer { type T val element: T[详细]
2023-04-10 10:02 分类:问答Scala related trait, abstract types
I have 2 related traits.Dao will be used be a class and DaoHelper will be used by Dao\'s companion object.I would like trait Dao to be able use functions defined in DaoHelper, the only way I could fig[详细]
2023-04-05 06:44 分类:问答Constructing subclasses from base abstract class
I want to define a constructor in an abstract class that will create concrete subclasses. abstract class A {[详细]
2023-02-07 20:20 分类:问答How to use Scala's this typing, abstract types, etc. to implement a Self type?
I couldn\'t find the answer to this in any other question. Suppose that I have an abstract superclass Abstract0 with two subclasses, Concrete1 and Concrete1. I want to be able to define in Abstract0 s[详细]
2023-01-27 08:57 分类:问答二十不惑,三十而已:都别弄丢了你自己?
《二十不惑》,《三十而已》最近的火爆让大家感慨:“二十不糊涂,不过才三十。我中间很迷茫。”看似简单的一句话,却戳中了无数人的心。[详细]
2022-12-24 13:15 分类:问答