我正在学习Martin关于scala的函数式编程课程,目前我已经学到了两件事情,它们在一起是没有意义的:Nothing是所有其他类型的子类型。这两种说法不能共存,这到底是怎么做到的呢?“每一种其他类型的亚型”的确切含义是什么?编辑1
在Scala中,Nothing定义为abstract final class Nothing extends Any.那么,它如何扩展其他类呢?
我在玩库。length of the vector is {}, and the length squared is {}", mypoint.length(), mypoint.length2());在我的使用行中cgmath::vector::Vector3<f64>' does not implement any method in scope named 'length'
除非我导入了length()使用的一个特征深入研究,看起来长度方法是