Hacker News new | ask | show | jobs
by TeeWEE 4901 days ago
Disclaimer: This is not really related to futures and akka. I love them. But I just have some comments on the code and on Scala in general.

While I like the concepts in Scala and Akka very much, I have to say that there are some big disadvantages of Scala.

For example, in this code some magic is happening that is not explicitly coded. For example if I look at this val:

implicit val system = ActorSystem("future")

To me it looks like it is not used within the code block, since it is not referenced. However because its an "implicit" it is applied whereever possible. For me this is very unclear. And in fact a lot of Scala-ers say implicits are dangerous creatures.

I also see the "val future" and a callback "future onSuccess". But i would expect that the "onSuccess" would be bound to the future, however I dont see this coupling. Where is this happening? Magic?

While Scala has some very good things, it also has a lot of complexity. And while it might be the "cool new language" out there. It doesnt mean that it simplifies your program. Less code != Better code.

Note: I love scala, but only a subset of it :-). I hate the stacktraces.... Huge!

I bet my money on Kotlin.

2 comments

I dream of the day when I can read the HN comments on a Scala post without the anti-Scala trolls posting.

   future onSuccess { foo } == future.onSuccess(foo)
This is Scala 101. How can you not know this?

As for implicits -- that's an old argument I'm not interested in revisiting.

Thanks noelwelsh couldn't agree more with you
Sorry was not meant as a troll post. Indeed you are right. I got confused by the syntax. My fault.

However consistency in its syntax is something I value in a language. Scala is too much influenced by Java, imho.

B.t.w apart from these kind of things in the language, the biggest thing I really hate about it, is builtin support for XML.. WTF Really?

I would recommend anyone trying to learn functional style of programming to pick up lisp :-)

> I bet my money on Kotlin.

Two weeks ago you were betting your money on Clojure: http://news.ycombinator.com/item?id=4981587

You got me there :p. But to be honest I dont have a lot of expiernce with clojure and kotlin. More experience with Scala. However I just found out about Kotlin. Purely functional is cool... But i'm not sure if the next gen language is purely functional.