on a somewhat unrelated note, you can write a noisy channel model spell checker with a lot more data and a bit more code: http://norvig.com/spell-correct.html
Nice example. I like Scala, but its a huge leap from Java. Kotlin clearly tries to mitigate this while still having some nice terseness which Scala also fails at. Hopefully Kotlin will get some traction.
Thanks, I was thinking about writing a Scala version too.
Concerning verbosity I believe Scala to be a more compact language. The point of Kotlin though - according to JetBrains - is to make Java more safe and concise but simpler than Scala.
That said, I/O handling in the Kotlin example can probably be reduced by 2-3 lines using alternative functions from Kotlin stdlib.
4 comments
[ 6.1 ms ] story [ 22.1 ms ] threadConcerning verbosity I believe Scala to be a more compact language. The point of Kotlin though - according to JetBrains - is to make Java more safe and concise but simpler than Scala.
That said, I/O handling in the Kotlin example can probably be reduced by 2-3 lines using alternative functions from Kotlin stdlib.