Good news. The Kotlin plugin will be part of IntelliJ IDEA 15. >Today, we’re excited to share with you that the EAP build we published yesterday comes with a bundled Kotlin plugin JetBrains aims to release Kotlin 1.0 this year. >If you’re following the latest news in the Kotlin blog, you may know that its team is working hard to make it ready for the release this year. ----- http://blog.jetbrains.com/idea/2015/07/intellij-idea-15-eap-kotlin-love/ ---- Kotlin now has `sealed` classes. I think they primarily resemble the concept of "tagged union"s. Rust has a similar elegant construct in form of `enum`s. ~~~kotlin sealed class Type () { class Named(val name: String): Type() class Nested { class Function(val param: Type, val result: Type): Type() } object Top: Type() } ~~~ ~~~kotlin when (type) { is Named -> println(name) is Nested.Function -> println("$param -> $result") // Alternatively, we can omit is here is Top -> println("TOP") } ~~~ ----- - Sealed Class Hierarchies and when-expressions, https://github.com/JetBrains/kotlin/blob/2dea17a3a937940bd1f668307db7110edc6b9da3/spec-docs/sealed-hierarchies-and-when.md - Support exhaustive when for sealed class hierarchies, https://youtrack.jetbrains.com/issue/KT-7606 - https://doc.rust-lang.org/book/enums.html ---- Some links for the **Kotlin** programming language: - Project homepage — https://kotlinlang.org/ - Source repository — https://github.com/JetBrains/kotlin - Trending Kotlin projects — https://github.com/trending?l=kotlin&since=monthly - Interactive web console — http://try.kotlinlang.org/ - Discussion site — https://devnet.jetbrains.com/community/kotlin?view=discussions - Reddit community — https://www.reddit.com/r/Kotlin/ - Maven repository for snapshot artifacts — http://repository.jetbrains.com/all/org/jetbrains/kotlin/ ---- >"Java is a blue collar language. It’s not PhD thesis material but a language for a job. Java feels very familiar to many different programmers because I had a very strong tendency to prefer things that had been used a lot over things that just sounded like a good idea." I think Kotlin is a language that adopts this idea really good. ----- - via: http://www.reddit.com/r/Kotlin/comments/30vgnn/does_kotlin_have_any_killfeatures/crxbe25 - James Gosling (1997): "The Feel of Java", http://www.win.tue.nl/~evink/education/avp/pdf/feel-of-java.pdf ---- Some Mozilla guys released a paper about programming experience with their new programming language Rust and this Servo web layout engine. I didn't program much in Rust, but follow a lot of their work on Github and Reddit. I have some old Rust code of a "CPU emulator" inspired by LLVM and libcpu by Michael Steil et al with deprecated sigil syntax `~` for pointers. I really like Rust but the borrow checker is not my best friend. ----- - http://arxiv.org/abs/1505.07383, "Experience Report: Developing the Servo Web Browser Engine using Rust" - https://github.com/libcpu/libcpu ---- This academic stuff is very arcane somehow. Let's go mainstream, but with a bit pattern-matching sugar: ~~~kotlin fun fib(n: Int): Int { return when (n) { 1, 2 -> 1 else -> fib(n - 1) + fib(n - 2) } } fun main(args: Array) { for (n in 1..10) { println("fib($n) = ${fib(n)}") } } ~~~ Is recursion good? I don't know. Just make sure you use the iterative version in production code. ---- There is also a lot of beauty in the polymorphic defined recursive functions I first saw in Erlang: ~~~erl -module(fib). -export([fib/1]). fib(1) -> 1; fib(2) -> 1; fib(N) -> fib(N - 2) + fib(N - 1). ~~~ Similarily, there is also a lot of beautyness when we consider logical programming and this substitution and unification stuff in Prolog. I first saw this, when I learned about contraint satisfaction problems. ~~~prolog append([], X, X). append([X|XS], YS, [X|ZS]) :- append(XS, YS, ZS). % ?- append([], [1, 2], [1, 2]). % true. % ?- append([6], [1, 2], [6, 1, 2]). % true. % ?- append(X, [1, 2], [6, 1, 2]). % X = [6] ; ~~~ ----- - Petra Hofstedt, Armin Wolf (2007): "Einführung in die Constraint-Programmierung", Springer ---- The first time I saw variable and return types on the right side after a colon was in ActionScript. This was beautiful. ~~~as function repeatString(string:String, numTimes:uint):String { var output:String = ""; for(var i:uint = 0; i < numTimes; i++) { output += string; } return output; } ~~~ Now a lot of very nice modern programming languages use this convention: TypeScript, Scala, Kotlin, Rust, Swift. ---- Jetbrains **Kotlin** has a new fresh background image on its project site. ![kotlin-fresh-site.jpg](/media/306/kotlin-fresh-site.jpg) What does this tower mean? Somehow this is very impressive. ----- - http://kotlinlang.org/