If I am trying to develop some software that works on binary data, I don't want Scala to optimize for me behind the scenes.
如果我要开发的某种软件是用来操作二进制数据的,我可不希望Scala在屏幕后面为我做什么优化。
For example, every value in Scala is an object, this includes basic data types (i.e. booleans, Numbers) as well as functions.
例如,Scala中的每个值都是一个对象,包括基本数据类型(即布尔值、数字等)在内,连函数也是对象。
Fortunately, Scala has case classes: classes that are data-rich and encapsulation-thin and have some useful features that make them quite suitable for building an AST.
幸运的是,scala有case类:一种提供了丰富数据、使用了非常薄的封装的类,它们所具有的一些特性使它们很适合构建AST。
Fortunately, Scala has case classes: classes that are data-rich and encapsulation-thin and have some useful features that make them quite suitable for building an AST.
幸运的是,scala有case类:一种提供了丰富数据、使用了非常薄的封装的类,它们所具有的一些特性使它们很适合构建AST。
应用推荐