Hacker News new | past | comments | ask | show | jobs | submit login

Personally I don't care for Scala, at least from the viewpoint of a maintenance programmer.

I was working one time on a program that did what should have been trivial parallelism but there was some kind of race condition because we'd put the same answer in and get different answers.

The implementation used actors and the guys who wrote it couldn't tell me much about it (for instance, how it decides how many threads to use.) I spent a day reading docs and messing around with it and didn't get anywhere.

I woke up the next morning and rewrote it using the ExecutorService from Java in 15 min and it worked right the first time and worked ever since.

Personally my experience with Scala has improved my Java programming, but if you want a language that is "Java with fewer warts" you might be interested in C#. C# has real generic without type erasure, all kinds of support for async programming, and even had method handles long before Java did.




I would say that is because neither you nor the original authors had an idea of how things work (thread scheduling, etc).

Good for you if you rewrote it and it did solve your problems. Obviously it was not such a huge task, if it was, learning how to control those things would have been wiser.

In this specific case 'dispatchers' is what you were looking for (http://doc.akka.io/docs/akka/snapshot/scala/dispatchers.html) and it is quite flexible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: