5 ms·
> Scala is a rugged, expressive, strictly superior replacement for Java. Scala is not replacement for Java. It runs on JVM and can invoke java code, but has co
by jkot 10y ago
> Scala is a rugged, expressive, strictly superior replacement for Java.
Scala is not replacement for Java. It runs on JVM and can invoke java code, but has completely different approach than Java. Use Kotlin if you want Java replacement.
Also I would argue that Scala is much better suited for writing compilers than Haskel.
- hibikir 10y agoScala can be a fine Java replacement, if you drop 20% of its features on the floor. As long as you never see a higher-kinded type, I think you are ahead of Kotlin, and the learning curve is not really any different. The problem with this approach is that 90% of Scala libraries are built by people that live in higher-kinded land, and believe that since they have reached that level of expertise, so should everyone else, the second they start learning the language. For instance, look at SummingBird: The hello world example includes F bounded polymorphism, and path dependent types! Anyone new to the language would run away screaming, and I'd not blame them.
- jkot 10y agoScala compatibility is not so great. It has its own collections and other libraries. And it does not even support java getters and setters.
- premium-concern 10y agoWhy would you create a new language and then keep a huge part of what developers interact with on a daily basis in such a broken shape as in Java? (Or rack up a massive amount of complexity and break your typesystem by trying to put lipstick on the Java collection pig? (Kotlin).)
- jkot 10y ago1 billion lines of code, that is why.
- nv-vn 10y ago> Also I would argue that Scala is much better suited for writing compilers than Haskel. Any examples of how it can help out?
- jkot 10y agoLanguages today are not just about command line compiler. Compiler today must interact with tools such as IDE. If you keep some basic rules, it is reasonably simple to write compiler which can interact with Intellij Idea and provide incremental compilation, live edit hints, error messages. In Haskel you dont have any of that.