The next example shows a contrived example that defines packages using the nested package syntax in Scala, which is similar to the namespace syntax in C# and the use of modules as namespaces in Ruby.
下面这段虚构的代码展示了如何使用Scala语言的嵌套语法来定义包,这些语法与C#的命名空间语法以及Ruby使用模块作为命名空间的语法很相似。
The next example shows a contrived example that defines packages using the nested package syntax in Scala, which is similar to the namespace syntax in C# and the use of modules as namespaces in Ruby.
下面这段虚构的代码展示了如何使用Scala语言的嵌套语法来定义包,这些语法与C#的命名空间语法以及Ruby使用模块作为命名空间的语法很相似。
应用推荐