辞書: Kotlin

投稿日: 更新日:

Kotlinとは

プログラミング言語の1つです。

デフォルトがfinal

Kotlinが分かってるなーと思ったのは、 デフォルトでクラスがfinal(継承できない)であることです1

The open annotation on a class is the opposite of Java’s final: it allows others to inherit from this class. By default, all classes in Kotlin are final, which corresponds to Effective Java, Item 17: Design and document for inheritance or else prohibit it.

Ceylonも自分好みで面白いなと思ったんですが、 finalを付けないとデフォルトで継承可能なので、 この点ではKotlinの方がいいですね。

公式サイト

外部サイト