他们决定不在Scala中实现枚举类型的原因是什么?当前语言设计有什么好处(定义对象和扩展scala.Enumeration而不是创建新的枚举类型)?
问问题
258 次
1 回答
6
I don't see any reasonable benefits of Enumeration in it's current state and tend to think it is design flaw that scala community is trying to overcome. It is not easy, but I guess this is definitely will be done in next two major scala versions. In all scala code I've seen sealed object hierarchy was given a preference.
于 2013-09-04T15:55:18.103 回答