- Module system: this looks extremely wonky, especially considering what Oracle is planning with Jigsaw
- Pattern matching is extremely hard to get right
- "No hybrid", "industrial", that seems to be a pure marketing move, considering that even 95% of the syntax is the same as in Scala, together with types like Unit, Any, ...
- Kotlin is pretty much in the same complexity level currently, without being nearly as clean and orthogonal as Scala.
My estimate is that as soon as someone writes more than a few hundreds of lines of code in Kotlin, things will break down, especially in the collections area, features get thrown in, complexity explodes.
If they want to have some primitive Java-like collection design, then maybe not. But judging from their comments they want to have a design with higher-order functions (like map, filter, flatten, flatMap, partition, ...), they will need higher-kinded types. The problem is that higher-kinded types don't work well with reified generics.
I know it is quite popular to bicker about the "complexity of Scala", mostly coming from people having visited the webpage for a few minutes and not from those people using Scala in industry daily.
> They mince no words in emphasizing that this is an OOP language.
Scala is as OO as Kotlin, no compromises here.
> "Scala's syntax more flexible (with its own caveats)"
Not really. Scala and Kotlin share almost the same syntax (apart from <> vs. [] for generics).
I really wonder ... Microsoft is constantly increasing the margin between their languages (C#/F#) and Java, while the Java community as a whole has nothing better to do than being a huge bickering load of "language experts" getting nothing done at all.
The question is: Should we really wait for yet another language like Gosu, Fantom, Ceylon, Kotlin, ... to be usable in 2020?
Or should we maybe just starting to use Scala, which is proven, mature and stable, has received tons of bugfixes over the last then years, has a complete language specification, runs on JVM, with work being done to let it run on the CLR and on the LLVM, with a JavaScript compiler in the works, with a huge useful and clean standard library, with tools to check if JAR files are binary compatible, with a great amount of third party libraries, ...
I think you read my post wrong. I too am skeptic of the module system. I highlighted why I think this language will be more likely to be used as a better Java by thinking like the hypothetical target. I also noted a key fact that framing is a big deal. So while your conclusion makes perfect sense, it fails to give psychology enough weight. Scala can do OOP well yes but it also caters to functional programming. Kotlin seems like it will not go out of its way to do so. To some people this is good. I prefer functional programming and so would still use Scala by default when on the JVM.
Pattern matching is easy to get good enough. In fact I've never found a pattern matching system that I wasn't happy with. Scala's case classes are powerful but a bit different to the norm, I think Kotlin's will be more familiar to many by de-emphasizing algebraic types. But they do clutter it with what in Scala would be called extractors.
As for syntax. People create crazy DSLs by leveraging corner cases in scala's lenient syntax, Kotlin seems to restrict there. I think this is a good thing for many people. I came to Scala with a good amount of functional programming experience, I found its concepts dead easy. The hardest part was the syntax and how many different ways there were to do some simple things e.g. function syntax and proper uses of _ are tricky for the new comer.
How is Scala big? For the reasons I think it is wonderful and would rather use it. Existential types, extractors, implicits, optional laziness, currying, actors, composing with maps and fold at the forefront. I think it is elegant but most people prefer to just get the work done. By the way, you don't need higher kinded types to do a collections library which takes first order functions. You just need higher kinds for succinctness.
I will note that I mostly write F# code and am less familiar with the JVM - thanks for the correction on inline. Although Scala's doesn't seem to be of the same caliber as F#'s based on a cursory search. Do correct me on this too. Although Scala does have a higher kinded type system. Unlike F#. In F# I sometimes have to abuse inline to get around this limitation.
- Scala has function inlining, look at @inline.
- Module system: this looks extremely wonky, especially considering what Oracle is planning with Jigsaw
- Pattern matching is extremely hard to get right
- "No hybrid", "industrial", that seems to be a pure marketing move, considering that even 95% of the syntax is the same as in Scala, together with types like Unit, Any, ...
- Kotlin is pretty much in the same complexity level currently, without being nearly as clean and orthogonal as Scala.
My estimate is that as soon as someone writes more than a few hundreds of lines of code in Kotlin, things will break down, especially in the collections area, features get thrown in, complexity explodes.
If they want to have some primitive Java-like collection design, then maybe not. But judging from their comments they want to have a design with higher-order functions (like map, filter, flatten, flatMap, partition, ...), they will need higher-kinded types. The problem is that higher-kinded types don't work well with reified generics.
I know it is quite popular to bicker about the "complexity of Scala", mostly coming from people having visited the webpage for a few minutes and not from those people using Scala in industry daily.
> They mince no words in emphasizing that this is an OOP language.
Scala is as OO as Kotlin, no compromises here.
> "Scala's syntax more flexible (with its own caveats)"
Not really. Scala and Kotlin share almost the same syntax (apart from <> vs. [] for generics).
I really wonder ... Microsoft is constantly increasing the margin between their languages (C#/F#) and Java, while the Java community as a whole has nothing better to do than being a huge bickering load of "language experts" getting nothing done at all.
The question is: Should we really wait for yet another language like Gosu, Fantom, Ceylon, Kotlin, ... to be usable in 2020?
Or should we maybe just starting to use Scala, which is proven, mature and stable, has received tons of bugfixes over the last then years, has a complete language specification, runs on JVM, with work being done to let it run on the CLR and on the LLVM, with a JavaScript compiler in the works, with a huge useful and clean standard library, with tools to check if JAR files are binary compatible, with a great amount of third party libraries, ...