by shigemk2

当面は技術的なことしか書かない

The Scala Language Specification

「Scala言語仕様」と訳されるこのドキュメントは、文字通りScala開発者のオダスキー先生が中心となって作成された言語仕様の文書である。

そのうち読書会とかあるんだろうか。

おそらく2.11が最新版。 Scala Language Specification

2.8なら邦訳もある。 http://www.scala-lang.org/docu/files/LangSpec2.8-ja_JP.pdf

op       ::=  opchar {opchar}
varid    ::=  lower idrest
plainid  ::=  upper idrest
           |  varid
           |  op
id       ::=  plainid
           |  ‘`’ stringLiteral ‘`’
idrest   ::=  {letter | digit} [‘_’ op]

識別子についての記述がなんとなく参考になります。 なお、Programming Scalaにも参考文献としてちょくちょく出ているので、ちびちび読んでいけばいいと思うんです。

Programming Scala: Scalability = Functional Programming + Objects

Programming Scala: Scalability = Functional Programming + Objects

; as newline on Scala

println("a");println("b");println("c")

Scala is a line-oriented language where statements may be terminated by semi-colons or newlines.

こんな感じで、一応のアレとして、;を改行として見なすことができる。

なお、

The tokens that can terminate a statement are: literals, identifiers and the following delimiters and reserved words:

this    null    true    false    return    type    <xml-start>
_       )       ]       }

http://www.scala-lang.org/files/archive/spec/2.11/01-lexical-syntax.html