構文と型システム的には、CeylonはJava--++, KotlinはScala--+ くらいな印象、今のところ。Kotlinは明らかにScalaに構文を似せてるけど、CeylonはJavaに似せてるのか似せてないのか微妙なところ。
2013-10-19 00:10:04Same style fib programs on Scala, Kotlin, and Ceylon IDE http://t.co/arPUy6IqbG #scala, #kotlin, #ceylon
2013-10-19 01:29:50Ceylonはセミコロンを省略不可で、ifも含めた多くの構文は値を返さない(文)。Kotlinはそれよりは式である構文が多いけど、`return`は必須っぽい。セミコロン省略可。Scalaは宣言以外の構文はほとんど式。Javaは宣言以外の構文はほとんど文。セミコロン必須。
2013-10-19 01:38:26省略可能度 Scala > Kotlin > Ceylon > Java 式指向 Scala > Kotlin > Ceylon >=(?) Java なイメージ。Ceylonの式はLang Spec読んでみたところspecial formはほとんど値返さないことがわかった。
2013-10-19 01:43:51Kotlinはもう少しラフなドキュメントだけど、 http://t.co/DasPjcxXos 見る限り、special form はおおむね式っぽい。
2013-10-19 01:47:09@kmizu You can reduce 'return' by using "fun foo() = bar()" form. this also you can remove return type.
2013-10-19 02:07:35@ikeji Thanks. I confirmed that. However, such form doesn't seem usable when the function body consists of multiple expressions block.
2013-10-19 02:39:46@ikeji e.g. a `fun f() = { e1; e2 }` doesn't compile. When sequence of expressions is needed , Should I use a form such as`fun f(): T {}` ?
2013-10-19 02:43:47@kmizu That form doesn't support multiple expressions. http://t.co/6jHCyGXoFT Maybe it's by design.
2013-10-19 02:57:34@ikeji I understood the reason. But it seems inconsistent that multiple expressions block is not suppor(cont) http://t.co/zFKeFY1lKO
2013-10-19 03:14:33@ikeji You misunderstand what I said. I say that in `if(cond) { exp }`, { exp } is interpreted as usual expression. However, (cont)
2013-10-19 22:43:04@ikeji standalone `{ exp }` is interpreted as arity-1 anonymous function. It seems inconsistent .
2013-10-19 22:44:39@kmizu Design? I think the syntax that make unexpected return value from function is too bad design.
2013-10-20 03:44:35@ikeji As you said, the syntax is bad If it make unexpected return value from function easily. However, your thought is imaginary fears
2013-10-20 10:58:08@masanobuimai Kotlinはコミュニティもまだできてないし、注目集めるにも至ってないから、待ってもいいんじゃないですかね。趣味で学ぶにしても、Scalaの影響がかなり強くて、そこから機能削減してよく使うサブセット入れた感じですから、Scalaの方が真っ当かなと。
2013-10-21 13:46:12@ikeji @kmizu you can use the standard function run(): fun foo() = run { expr1 expr2 }
2013-10-21 17:29:04@abreslav @ikeji Thanks! I didn't know about such standard function.
2013-10-22 01:53:07