Remix.run Logo
ndriscoll 2 days ago

My claim is backed by years of direct experience with C, C++, Java, Go, Scala, PHP, and Python. I can tell you that Scala has been the easiest to write, read, and review by far. I'm not sure why you'd expect "easier to read and review" to be metrizable. Nor do I see the connection between those things and wide use, tooling, or searchability. If you need to search something to understand what you're reading, I suppose that itself is a measure of that code being difficult to understand (i.e. it does not stand on its own).

> I've not seen this play out on a codebase of nontrivial size.

I have :shrug:. There's currently this discussion[0] about some functional design principles on the front page. Things like making illegal states unrepresentable mean that you just don't have to think at all about various would-be error paths (again, making it easier to write, easier to read, and easier to review), and while Scala doesn't automatically give you such a design, it at least makes it possible (unlike e.g. Go). You just need a good lead to guide people's design.

In fact "make illegal states unrepresentable" is perhaps just one facet of a more general observation that if you accurately model your domain, the code basically writes itself. IME Scala's type system hits a sweet spot of giving you the ability to model what you need without forcing you to model concerns you don't want to care about (e.g. Rust's lifetimes).

Demand for what? Why would there be intrinsic demand for Scala programmers? Why isn't there a similar premium for Perl or COBOL programmers? It's not like Javascript or C/C++/Rust where you have limited options of what languages can be used in some domain (browsers, embedded, etc.). It's a high level application language, which is a space with tons of other languages.

One possible contribution is that it has features that more experienced engineers can appreciate (like a compiler that helps prevent basic errors and a good concurrency story and workable macros so that you can focus on teaching your team domain context instead of looking for errors with nil references or locks or whatever or poring over tons of boilerplate. Performance is also good enough that you probably don't need to worry about e.g. horizontal scaling), so you may tend to see them wanting to use it more.

e.g. I did a few years of PHP (Laravel) work. You won't ever find me taking a PHP job again; I've had enough of it for one lifetime and don't need that kind of stress. My understanding is Ruby/Rails are similar, so again I just wouldn't consider a Rails job. I'd probably prefer working with Scala, C++, or maybe Rust, so you're more likely to find me in a "Scala programmer" statistic and won't find me in a "PHP programmer" statistic, but that's not really why I cost more. I expect more money than your average developer because I have more experience than your average developer and I've been in tech lead roles for a while now.

[0] https://news.ycombinator.com/item?id=42244851

btreecat 6 hours ago | parent [-]

Having also used all those languages, Scala was easily the worst documented, tooled, and community supported.

That makes it worse as a language overall because of the reduced devex.

You may personally find it great, but as a business language, it isn't.