Live data from Hacker News

Scala isn't fun anymore

alexn.org

91–100 of 394 posts

Re: Scala isn't fun anymore

#91
post #60

Earlier quoted context omitted.

> why not just choose a language where that semantic already is the core semicolon semantic of the language? The semicolon isn't semantic. A "semicolon" monad is essentially a single global context object. Most languages let anyone anywhere introduce a global context accessible from everywhere else. At least a monad lets you track it all.

It's not just context. It's also asynchronicity and error handling for example. The semicolon semantic is how operations separated by semicolons (or newlines) are evaluated and how they impact the general state the program is in. Which is also what a monad's flatMap does, in a configurable way.

No, it is just context. Which context you choose in which part of your code is up to you. Somewhere I might choose ZIO. Elsewhere I might just choose an error-context. Or a state-context. Or a "let me accumulate some extra information while doing data-rprcessing"-context.

And it is always explicit when you are in a context and which one it is. This is really the strengths over languages where this concept is missing. Those languages will just merge and mushup contexts and you never know exactly which things are safe to use and not.

Re: Scala isn't fun anymore

#92

If you want your engineers to spend time playing with highly academic libraries that are unnecessarily complex for the business problem you are trying to solve, choose Scala.

Highly academic libraries, because of course companies like Comcast or Disney Streaming are universities.

Re: Scala isn't fun anymore

#93

> I’m also having affectionate memories of JavaScript and Python I am afraid, things are equally messy in JavaScript and Python too. "X language isn't fun anymore" is exactly how I feel about X = JavaScript, X = Python, X = C++, X = Java and many other languages. There was a time when I found Python and Js to be very fun languages. But recently the ecosystem has been becoming a mess. Build breakages on dependency upg…

I've really enjoyed Golang for this reason. The powers that be take a cautious approach before adding major new stuff, even when the community complains loudly about lack of important features (e.g. generics for many years until recently). Go code I've written years ago is easy to adapt to new versions and ways of doing things, even when I have to switch gears to others languages for months/years at a time. Go is predictable.

Re: Scala isn't fun anymore

#94
post #16

Earlier quoted context omitted.

It's hard to answer meaningfully without risking starting a pointless debate in the comments or being fully honest, but I will try: There are two FP ecosystems inside the Scala community with a very adversarial relationship towards each other. The root is that many years ago the lead developer of one of those FP communities allowed (based on community feedback) a speaker to give a technical talk. There were some peop…

That speaker wasn't just anybody with 'right-wing views', it was 'Mencius Moldbug' himself. (See, for example: https://www.unqualified-reservations.org/2013/09/technology-... )

I think I meant "fair-right" (that's why there was a hyphen) and wanted to avoid a more exact characterization to avoid sparking a debate around it.

Re: Scala isn't fun anymore

#95
post #33

Earlier quoted context omitted.

1. Because different projects will want different monads 2. In my experience, having up-conversions between different monads is intuitive low-noise

> Because different projects will want different monads It doesn't look like that to me, based on how the ecosystem currently converges on a single one. I understand there may be some projects that do that, but if the majority converge, then it's still needles complexity. However, I might be wrong. I've been an external observer for a while already.

History proofs this wrong. Just look at it: first there were Scala Futures and Twitter Futures. Then there came Scalaz and Monix, later Cats-effect. Now ZIO also joined. And each library even brings different kind of effect types.

And all of that works, even in combination! This is as if you mix angular and react. Sure, you should try to not do that as much as possible, but the mere fact that you can do this in Scala is a sign of awesome language and library design that is far outstanding compared it the majority of other languages.

You could never come up with the "one true solution" from the very beginning.

Re: Scala isn't fun anymore

#96
post #42

I don't have a ton to say here, the article says it all really. But this also reflects my experience when developing with Scala and although I love the language and its brevity, I went back to Java because I hated the Scala toolchain, sbt, dependency issues, etc. Basically, I like the language in isolation but the overall experience was horrible.

Java has the same dependency issues? I vividly remember spending days on jars shading in Maven. Basically, a single approach that would solve this, irrespective of the language, would be isolating dependency trees of every library from each other, essentially duplicating the code of many common libraries in RAM (like Docker, but for libraries inside the same process). There's an option to do that in Maven, but it's n…

Essentially OSGI is that. It is still a ballache tho, and slow to boot, so I would not recommend it.

Best bet it to be picky about dependencies that respect backward compatiblity or do name changes (like commons collections4)

Re: Scala isn't fun anymore

#97

Earlier quoted context omitted.

It has the ability to make real-world concurrency scenarios trivial e.g. * 3 fibers - each fetches from remote storage, local storage and in-memory cache. * Race them, kill the two slowest and give me the result. * Free the resources safely including if any of the connections fails for an unforeseen reason. That's a few lines in ZIO. Pain to get working properly in Java, Rust, Go, C++ at least.

This is exactly the kind of problem that 0.000324% of us are having while being productive in Java/Rust/Go/C++ ... ;)

In the last 10 years every team/company I have been working in had to deal with at least one of these problems. Good for you if you only ever have to work with single threaded applications, but for most of us the reality of modern software development is different.

Re: Scala isn't fun anymore

#98

Earlier quoted context omitted.

It has the ability to make real-world concurrency scenarios trivial e.g. * 3 fibers - each fetches from remote storage, local storage and in-memory cache. * Race them, kill the two slowest and give me the result. * Free the resources safely including if any of the connections fails for an unforeseen reason. That's a few lines in ZIO. Pain to get working properly in Java, Rust, Go, C++ at least.

It may be the best on any platform outside of the BEAM, but there are a lot of correlating factors needed to create the ideal concurrency platform that you simply can't do without building them from the ground up. It's why almost anything outside the BEAM can't make that claim.

True, BEAM is a platform on its own. Scala can use Akka which is also awesome, but doesn't have all the nice things builtin like BEAM.

I guess a merge of Scala as the language (because honestly, Erlang & co suck) and BEAM as the platform would be awesome!

Re: Scala isn't fun anymore

#99

If you want your engineers to spend time playing with highly academic libraries that are unnecessarily complex for the business problem you are trying to solve, choose Scala.

Highly academic libraries , because of course companies like Comcast or Disney Streaming are universities.

Red herring.

Re: Scala isn't fun anymore

#100

Earlier quoted context omitted.

It has the ability to make real-world concurrency scenarios trivial e.g. * 3 fibers - each fetches from remote storage, local storage and in-memory cache. * Race them, kill the two slowest and give me the result. * Free the resources safely including if any of the connections fails for an unforeseen reason. That's a few lines in ZIO. Pain to get working properly in Java, Rust, Go, C++ at least.

This is actually trivial in Go as well, with a context (cancellation) and a WaitGroup or channel (waiting for the first one to finish).

Go fails at the error-handling and resource-safety part. The compiler does not cover you properly.
Post reply on HN