Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Scala has a very wide surface area, and it can be as simple or complex as you want it to be.

Written in a certain way, it's that different from writing Python 3 with PEP-484 type annotations. You can easily write Python-like code and just get things done. :)

Concurrency-wise, you can implement any concurrency model you want on top of it, and, personally, I find immutability + Task-like implementations (Monix, ZIO, IO, etc.) easier to understand than CSP, but that's just me. There's also actors & channels & threads & anything else you could want.

What's cool, though, IMO, is that once you need more power than just Pythonic Scala gives you, it has one of the most powerful type systems in the world; you can verify as much as you need to, and refine things over time. It's not a language that hamstrings you once you do need more power.

Scala gets its bad reputation from that huge surface area and flexibility, though. There was a period (2009ish, maybe) where the Scala community was having a field day with its flexibility via custom operators like '<<++>>' and implicit conversions and untyped actors that made it impossible to figure out what was going on. It was like using the worst of Erlang with the worst of Haskell with the worst of Java. I'd say they've matured past that entirely, though; in 2020, it's one of the nicer and more practical languages, ecosystem, & communities IMO. Scala is made for getting things done.



I think that's the main problem. Everyone writes Scala differently. In Go pretty much everything is quite similar. In JavaScript people also write things differently, like any other language really, but in Scala it is compounded.

Is there a concrete example of the Python-like code vs the more complex ones? I appreciate the help.

I'm thinking what language next should I pick up. It is either OCaml or Scala.


> Is there a concrete example of the Python-like code vs the more complex ones? I appreciate the help.

Haha this book is going to be 400 pages of concrete examples. It's not out yet, so you'll have to take my word for it for the next few weeks while the last round of reviews and editing are incorporated into the manuscript. If you're interested, put your email down and I'll let you know when it's ready!


I've been wanting to learn more Scala and this book seems perfect! I'm definitely going to buy it when it comes out. The website mentions that there's a PDF download of the free chapters, but I can't seem to actually find it. Do you have a direct link?


Lol okay. Thanks for the awesome work! I'll put down my email there.


This isn't helpful for you if you're trying to pick one, but I find OCaml and Scala somewhat complementary for my tastes:

Scala is a pretty great investment for services, big data, etc. It has a robust ecosystem.

However, the compiler is slow, and startup time can be slow (and Graal and Scala Native just aren't options yet), and if I want to make some tool that gets called fast in a loop or deploys as a "small", native binary, OCaml is nice alternative which I prefer to the only other compelling entry in this area, Go.


Experts' code looking like beginners' code is not a good thing! If better learning a language doesn't make your code clearer and more concise, the language isn't pulling its weight.




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

Search: