6 ms·
When I read this, I can't think of anything else but Scala fatigue. As a CTO migrating a company from .NET to the JVM, I found there's already a mess of conform
by jondot 10y ago
When I read this, I can't think of anything else but Scala fatigue. As a CTO migrating a company from .NET to the JVM, I found there's already a mess of conforming to a subset of Scala within real (and more importantly - ordinary) teams.
What subset of Scala? what libraries? what build system? apparently if things worked well, there would be at just one true - and well respected - answer for these.
So now I ask, honestly, why not go with Kotlin (https://kotlinlang.org/ https://kotlinlang.org/)? a language that IMHO didn't try to rule the world from day one (a Good Thing), but scores high on aesthetics, abstraction, power, IDE, compilation speed, and Java integration.
I have been following (and playing with) Scala since a bit before the Yammer thing exploded, I've been following Odersky as a student listening to the OOPSLA podcasts, and I never got to convince myself Scala is worth it. Can someone convince me to still use Scala when Kotlin is around?
- polskibus 10y agoCan you share the reasons for migration?
- jondot 10y agoWe bought a company, and that company had a technology that was based on the JVM. We were on .NET. The domain dictated that we needed a 'heavy lifting' framework like .NET or the JVM. We did also work with Ruby, nodejs, and Go for certain microservices. So now, decision making time: - Do you reimplement in .NET ? - Do you live with both .NET and JVM bases? - Do you migrate existing systems from .NET to Java? The .NET system was aging in any case, people needed a fresh breath of air, and it was nice to get rid of all of the Microsoft licensing and closed garden. It is then when I decided the new-gen stack would be Java8 and Kotlin, side-by-side. Kotlin was (and still is) amazing.
- romanovcode 10y ago>all of the Microsoft licensing and closed garden You mean the horrors of MIT[0] license? [0] - https://github.com/Microsoft/dotnet/blob/master/LICENSE https://github.com/Microsoft/dotnet/blob/master/LICENSE
- idobai 10y ago> When I read this, I can't think of anything else but Scala fatigue The language is evolving and learns from its mistakes and incompleteness - isn't it a good thing? > What subset of Scala? what libraries? what build system? apparently if things worked well, there would be at just one true - and well respected - answer for these. 1. Scalazzi safe Scala subset(https://imgur.com/a04WoHn https://imgur.com/a04WoHn), 2. the libraries fitting the job, 3. SBT(maven is a mess). But solving everything with a hammer isn't clever... > So now I ask, honestly, why not go with Kotlin (https://kotlinlang.org/ https://kotlinlang.org/)? a language that IMHO didn't try to rule the world from day one (a Good Thing) Yes it tries to do that. Today it's a trend for each tech company to roll out its own java/c/c++ copy as the holy grail. > aesthetics It's relative - try to build a large enough project and you'll see that Kotlin is just like Java. Some boilerplate has been removed but not a big update. > abstraction Kotlin and the abstraction - the same as in Java. > power What power? It's 20% of Scala's features and 10% of its power. Kotlin and Scala are uncomparable due to their design - the first one's goals are a less boilerplatish java while the other one is a hybrid oop+fp programming language concentrating on flexibility, typesafety and expressivity. > Can someone convince me to still use Scala when Kotlin is around? If you care about DSLs, expressive and abstraction powers, typesafety and functional programming then use Scala.
- kbenson 10y ago> apparently if things worked well, there would be at just one true - and well respected - answer for these. Since when has that ever been true of any language where it wasn't dictated from above as a requirement, or people weren't funneled through norms and making alternate methods at a minimum hard (e.g. python)? Expecting there to be one true and respected answer is to assume that you're either entering the ecosystem at a point where things are temporarily stable, or the ecosystem is stagnant, or someone has developed perfection and no advances can be made. CS and technologies and tooling hasn't stopped advancing, so I'm not sure why you would expect any particular language to have, or see that as a good thing.
- kodablah 10y ago> Can someone convince me to still use Scala when Kotlin is around? I probably can't, but several things about Kotlin have annoyed me. The main thing, coming from Scala, is lack of library-based Option as opposed to compiler null-checking enforcement. Sure Kotlin talks about the lack of overhead compared to an Option instance (or Optional in the Java 8 case) but the fact that I have to use imperative tools (if/else, etc) to do some of the functional things I might want to do (flatMap, treat as single-element collection, etc) drives me nuts. Also, for the longest time I couldn't even have a sealed data class hierarchy (i.e. ADTs) but I think that is being remedied. I have also run into bugs where their insistence on limited operator overloads causes ambiguity with overload resolution [0]. I could go on and on having written both a lot (but less Kotlin lately) but not sure this is the best forum for comparing. I might not convince you that Kotlin's downsides compared to Scala outweigh its upsides, but we can't pretend downsides don't exist. 0 - https://youtrack.jetbrains.com/issue/KT-9992 https://youtrack.jetbrains.com/issue/KT-9992
- runT1ME 10y agoI'm on one of the larger Scala teams in the U.S and have used it for quite a few years. In short, Scala is a much more powerful and expressive language (than Kotlin) that let's you write very functional code. Most on our team would consider programming in Kotlin a huge regression, as it's not really geared for functional programming. Here's a previous post where I talk about the pros and cons: https://news.ycombinator.com/item?id=11837782 https://news.ycombinator.com/item?id=11837782
- premium-concern 10y agoScala is light-years ahead of Kotlin. Kotlin spends a lot of time promising things and talking about things they plan to ship – and then never ship it. Scala devs are honest, tell you exactly what's planned and then ship it. Tooling is great, the library system is amazing, and people get things done. If you are happy with Java, keep using it (or try Kotlin – which is nothing more than a slightly less verbose Java). If you want a better language–use Scala.