|
|
|
|
|
by Dn_Ab
5443 days ago
|
|
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. |
|