r/programming • • Feb 22 '15

Java Makes Programmers Want To Do Absolutely Anything Else With Their Time

http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35 Upvotes

636 comments sorted by

View all comments

Show parent comments

7

u/[deleted] Feb 22 '15

Scala is a horrible language. It's far too flexible.

Then what we should use? A language with zero-flexibility, like Go? Flexibility is very-very important to write verbose dsls for frameworks. It prevents to make disastrously ugly & non-verbose fws like spring and hibernate.

Everything in scala has like 5 ways you can call it and everyone does it a different way making using third party libraries a pain if you ever have to debug.

I don't know what kind of experience you have with Scala but debugging Scala is easy beacuse of typesafety.

0

u/aldo_reset Feb 22 '15

Then what we should use?

Kotlin and Ceylon are two interesting languages showing what a post-Scala language can look like. They take some of the good parts of Scala but they both have a very narrow focus on their scope and feature set.

0

u/[deleted] Feb 22 '15 edited Feb 22 '15

They take some of the good parts of Scala...

They take no part of Scala. Actually, ceylon doesn't bring too much to the jvm just some cheap things. And kotlin just feels limited compared to Scala. You have to explore Scala's implicit-system with typeclasses and consider the benefits of it.

Edit: The main problem of Kotlin is that they don't want to make another Scala which is ok but they doesn't implement the best features of it. This choice make it a poor language compared to FP langs.

1

u/aldo_reset Feb 22 '15

The Scala baggage to implement type classes is plain crazy, I'll stick to Haskell if I need to implement something that will benefit from type classes.

0

u/[deleted] Feb 22 '15

Why? Scala's typeclasses knows more than Haskell's. There are problems that those solves easier. But isn't it tricky to program in Kotlin, Ceylon and Haskell at the same time? :D

3

u/aldo_reset Feb 22 '15

Not really. I actually find it healthy to juggle languages, I fear the day where I'll only be comfortable with one language and any other language feels too different to me.

At work, I do Java on Android and back end. At home, I have a Kotlin android app I'm working on (Kotlin really shines for Android) and I switch between Ceylon and Haskell for the rest. The simple thought of using Scala feels pretty ridiculous to me now, especially after spending a few days in a row writing Haskell (I used to love Scala, though).

Interestingly, I've found Kotlin easier to use to translate type class based code because of extension methods, which Ceylon doesn't have. Overall, I find Ceylon's type system more interesting and more powerful (especially with the awesome native support for product and sum types) but encoding type classes with it is more painful.

2

u/[deleted] Feb 22 '15

Not really. I actually find it healthy to juggle languages, I fear the day where I'll only be comfortable with one language and any other language feels too different to me.

I program in Scala, Nim, C, Shell very often and what? Scala is just a good way to do enterprisy and webdev things easily.

Interestingly, I've found Kotlin easier to use to translate type class based code because of extension methods...

What does it have to do with typeclasses? If that is what you call a type class what Kotlin does then you have to try Rust or Nim. They don't use real typeclasses but easy to use languages(except Rust).

especially with the awesome native support for product and sum types

Those things are the lasts what i want to see in a project! Signs of a poor typesystem. Code-smells.

I think you didn't used Scala enough to recognize its benefits and get rid of stone tools...

0

u/[deleted] Feb 22 '15

Just why are you using languages with the same DSL?

0

u/[deleted] Feb 22 '15

Ceylon is a joke, and neither come close to what Scala does.

1

u/aldo_reset Feb 22 '15

That's their stength: they offer a lot of what Scala does without all the crazy syntactic and semantic baggage.

Sometimes, less is more.

1

u/[deleted] Feb 22 '15

No, they offer some syntactical sugar.