Live data from Hacker News

Scala isn't fun anymore

alexn.org

241–250 of 394 posts

Re: Scala isn't fun anymore

#241

Earlier quoted context omitted.

On any platform?

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.

I find that one of the best things about using a managed runtime such as the JVM is the ability to get stack traces when things go wrong. When debugging, it is a considerable time saver to be able to determine the causality chain that lead to a specific failure.

Unfortunately, all libraries that abstract concurrency on an application-level break the ability to get meaningful stack traces. At least all the ones I know of, including ZIO, Akka, Monix, plain Futures, etc. I know that there is tooling to counteract that (such as the abstractions used in distributed tracing), but that's again on the language level.

In my experience, for all but the most advanced applications, the debuggability advantages of using linear code outweigh the performance advantages gained by abstracting over execution contexts. Thus, I would posit that concurrency is best dealt with on the platform, not the language level, especially when starting a project.

Of course there are some situations where a library can make some concurrency task appear trivial, but as long as there is no good tooling, the time saved using beautiful abstractions tends to be paid back 5-fold when those abstraction break (which they often do as an application grows).

Re: Scala isn't fun anymore

#242
post #186
post #77

Earlier quoted context omitted.

> Basically, a single approach that would solve this, irrespective of the language, would be isolating dependency trees of every library from each other Doesn't solve the problem completely because it is normal that applications need libraries to interoperate; consider case where application is passing objects between two libraries that both use types from a third library.

A major problem is that Maven (and friends) doesn’t distinguish between API dependencies (the API of a library using types from the API of another library) and implementation dependencies (a library depending on another library as an implementation detail). If that distinction were made consistently, implementation dependencies could indeed be separated into a dedicated classloader for each library, and you’d only ha…

OSGi allowed you to specify in excruciating detail what dependencies you had, whether API (i.e you wanted to re-export types from another library) or not, and much more. Unfortunately, it became far, far more complex than just implementing a simple module system, so as most things from the era (early 2000's) it became a huge, complex beast no one wanted to touch anymore.

Re: Scala isn't fun anymore

#243
post #222

Earlier quoted context omitted.

> pull in OSS and hide it behind a SaaS implementation (thereby complying with licenses) sorry, but you can do that shit anymore: https://wikipedia.org/wiki/Open_Software_License#Network_dep...

My interpretation of that clause is it applies to distributing code over a network. The most common example of this is serving javascript to a web browser. I'm pretty sure putting an API in front of a server that happens to run open source software doesn't count as "distribution", which is what we're talking about here with SAAS providers and Akka. If it does, then every site that is backed by servers running linux a…

I would disagree with your assessment. OSL was specifically crafted, to close this exact loophole:

> Most other open source licenses treat such network uses of software as internal to the company that runs the server, and they don't require disclosure of source code. That is seen by many nowadays as a loophole that permits large online companies to avoid their reciprocal source code obligations.

http://rosenlaw.com/OSL3.0-explained.htm#_Toc187293088

Re: Scala isn't fun anymore

#244

Earlier quoted context omitted.

Given that our brains have been the same for a few thousand years, maybe I don't need to optimise for that. Anyway, what we currently have as programming languages are all workarounds. Necessary for now, because how else would we program? But in the end we need to converge programming, math and logic, and once this is done, we will be ready for anything. And we won't need monads as a crutch, forced upon us by a type…

Programming languages will converge after(!) natural languages have converged. Not gonna happen in our lifetime! > I am sure the concept of number will outlive the concept of monad in terms of popularity. It already does. I don't get your point...

> Programming languages will converge after(!) natural languages have converged.

Interesting point. But I think you emphasise too much the surface syntax of the language. The language will be a new form of mathematics, and it will be universal, with adapters to various natural languages, of course.

Re: Scala isn't fun anymore

#245

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.

Or just have a culture of shipping projects without futzing. We have dozens of Scala services and many dozens of engineers and this hasn’t been a problem.

Re: Scala isn't fun anymore

#246
post #57

Programming isn't fun anymore. Modern ecosystem is too complex for fun.

Are all of them though? Web stuff is if you fall down the hole of "everything must be a docker container" and "chase latest JS fads" but I wonder if there is a saner route. Also things like console apps should still be pretty sane, depending on what you are building.

However trendy programming has very much become pointlessly complex.

Re: Scala isn't fun anymore

#247

The big takeaway here for me is that Akka has changed license to BSL. It's almost crazy to me that such a fundamental and widely used project would switch to such a restrictive license. Some more details here: https://coralogix.com/blog/akka-license-change/ > Lightbend are operating on a “per core” model, with their base license starting at $1995 per core (defined as a thread or vCPU) > The license is only enforced i…

Am I the only one that doesn't think this is really all that bad? I'll admit that I've not ever written a line of Scala, but in principal it seems like the only people who have to follow this license will be those who can afford it.

Sure, true FOSS is always better, bit the maintainers have to eat somehow. If you're making 25m+ ARR and are using their software, maybe you should be paying them something.

Re: Scala isn't fun anymore

#249

Earlier quoted context omitted.

In my experience, companies who chose Scala did enjoy a competitive advantage. Almost no bugs in production and predictable velocity. No more "not sure what this will break". In Scala projects I worked I almost never encountered any surprises except on boundaries (Scala Message broker) and etc. I saw projects (non-Scala) come to almost a complete stop from velocity perspective, because engineers were afraid to change…

Around 8 years ago we chose Scala for some random microservice, because there was ONE guy in the team that loved Scala and wanted to do something with it. I said, sure go for it, it will be interesting to test the technology. After he implemented the microservice, it was rock solid for like 5 years. Said dev left 3 years later after implementing the service. Two years after he left, we needed to do something to the m…

Two services each implemented by a single developer operated without problems for multiple business cycles and this is something to avoid?

How does the effort of tweaking them in an unfamiliar language years later stack up against the effort they would have required otherwise?

Re: Scala isn't fun anymore

#250

> Maybe this is just me getting older (going to turn 40 soon). Maybe all programming is terrible. I’ve actually started to read Java newsletters, maybe Spring isn’t that bad, I’m also having affectionate memories of JavaScript and Python, and thinking about having a plan B in case this programming thing doesn’t work out The older I get the more this rings true. I've had several false starts with fancy new languages a…

I'd encourage you to try Go or Rust, great ecosystems, great communities and lots of problems of programming languages of the 2000s are solved in much saner ways (dependency management, type checking, etc). There has been tremendous progress in programming languages in the last 20 years, it would be a shame to not learn about them and be super excited about them.
Post reply on HN