Remix.run Logo
ndriscoll 2 days ago

Performance is in the same space as java or go, but it's a much higher level language, so easier to write, easier to read, and easier to review. The language prevents many classes of errors without cluttering the written logic, so it's easier to understand what it's doing in terms of business domain. The jvm ecosystem is also massive.

If developers are more expensive, presumably there's a reason they're able to ask those rates besides "they know scala".

btreecat 2 days ago | parent [-]

> Performance is in the same space as java or go, but it's a much higher level language, so easier to write, easier to read, and easier to review.

What metrics are you using to make the claim that it's "easier" than more widely known, better tooled, and easier to search languages?

>The language prevents many classes of errors without cluttering the written logic, so it's easier to understand what it's doing in terms of business domain.

I've not seen this play out on a codebase of nontrivial size. I find it forces new ways of doing the same old stuff because "functional"

> If developers are more expensive, presumably there's a reason they're able to ask those rates besides "they know scala".

Why would you presume that it's not a simple supply and demand?

The fact is there a fewer FP devs. Why is that if FP is "better"?

There's fewer Scala devs, because Scala isn't better.

valenterry 2 days ago | parent | next [-]

There are no studies for anything, and if there were, they would be outdated by the time they are published.

So if you ask such a question, do you really expect anything more than people's firsthand experiences?

But I'll tell you my own side as well: doing anything with concurrency in any other language (yes, including Go and Rust) is just much much harder in comparison to Scala.

No wait, that's not true. There are languages that are better suited for that. But they are either academic or extremely niche and come with other problems (such as lack of ecosystem or much worse performance).

> The fact is there a fewer FP devs. Why is that if FP is "better"?

The fact is also that the number of FP devs has been and is growing. And so has the number of languages with those features.

> There's fewer Scala devs, because Scala isn't better.

What metrics are you using to make the claim that it "isn't better"?

btreecat 7 hours ago | parent [-]

Fewer devs, fewer libs, fewer tools, fewer projects.

Those are all quantified with out a research study.

GregarianChild 2 days ago | parent | prev | next [-]

> if FP is "better"

The term FP has lost precise meaning over time, and split into several related meanings.

• Focus on the absence of side-effects. (E.g. Agda, but not Scala, Ocaml, F#)

• Focus on the higher-order functions. (This is no longer controversial, but used to be)

• Focus on rich types. (The ML (the programming language) tradition, note that Lisp and even Lambda-calculus were born untyped)

• Focus on the use of traditional functional idioms, e.g. map-reduce, even when the implementation is totally not functional.

Which one are you referring to?

ndriscoll 2 days ago | parent | prev [-]

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 7 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.