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使用模块作为命名空间的语法很相似。
NET classes can directly translate into Ruby classes and .NET namespaces are represented as Ruby modules — both of these are always named using Upper CamelCase in Ruby.
NET类可以直接转换成Ruby类,而命名空间是以Ruby模块的形式表示,在Ruby中两者都会使用大写驼峰表示法。
NET classes can directly translate into Ruby classes and .NET namespaces are represented as Ruby modules — both of these are always named using Upper CamelCase in Ruby.
NET类可以直接转换成Ruby类,而命名空间是以Ruby模块的形式表示,在Ruby中两者都会使用大写驼峰表示法。
应用推荐