Live data from Hacker News

Scala projects are difficult to maintain

mungingdata.com

141–150 of 235 posts

Re: Scala projects are difficult to maintain

#141

I had a startup that went all in on scala. By the time we realized we chose the wrong language it was too late. Complexity is the primary issue with the scala language... when the whole goal is to have a scalable language which in itself is diametrically opposed to simplicity, your language is dead on arrival. After using Scala, Go seemed like a dream come true. We really loved the integration of OO and FP, really mi…

I think Scala needs to be treated something like how smart shops treat C++: there's so much there you can hang yourself with, so you need to define a subset/dialect and create a style guide and stick with it. This is how C++ has been successful at Google, and it's how I'd approach something like Scala if I were to go back to doing it now.

I don't disagree, but Java keeps adding features that make it closer to Scala, and Kotlin is well-supported and has cleaner syntax, so you have better choices than C++. The space between C and C++ is too fragmented, and too many of the languages are niche.

Re: Scala projects are difficult to maintain

#142
post #122
post #118

Earlier quoted context omitted.

Some of this comes from a willingness to do it, though. With static imports, it isn't actually impossible to effectively add keyword like things to java. It is done far less often than it is in other communities, though. And I can't see why.

I don’t see any hard to reason about feature in static inports. If I must choose something, I would say that reflection allows for some spooky things from a distance, but it is not abused as often in my experience.

Right. It is the lack of. "abuse" that I can't really explain.

To be honest, the same people I used to see do heavy Reflection are the same that did heavy meta programming. Usually to the same end.

I do not have a hypothesis on why.

Re: Scala projects are difficult to maintain

#143

This is so even at a low-level. Look at the beautiful code examples in a Scala book and you might be seduced, but make a small change and there is nothing beautiful about it.

Does rust have this issue? Anyone with experience?

Rust was a surprise to me. I didn't expect to like it (I'm a Kotlin person) but I ended up pretty happy with it overall.

I'm happy to pay the complexity tax associated with the borrow checker. You get outstanding performance and you usually don't need to dive deep into lifetimes to get some basic code running.

The language itself is reasonably pleasant but is missing some key features that really annoy me:

- No overloading

- No default parameters

- No named parameters

- Awkward constructor syntax which causes a lot of copy/pasting boiler plate

But overall, I'd say Rust is safely in my #2 spot, with Kotlin a bit ahead at #1.

Re: Scala projects are difficult to maintain

#144
post #121

Earlier quoted context omitted.

Also, Kotlin is a rather nice and much less radical "better Java", well-supported, but mostly popular on mobile.

Kotlin on the server is growing though and has the biggest library ecosystem to exist

Glad to hear this. There's really no reason it for it not to do well on the server.

Re: Scala projects are difficult to maintain

#145

As an old pragmatic, I believe for a new startup language of choice must be Java/C#. * Stable, Well understood language. * Rich ecosystem. * Fast enough. * Plenty of developers to hire from. * Scales well to large projects. No other language/ecosystem ticks all the checkboxes.

As an empirical thinker...consider Ruby and Python (and I expect back end JavaScript will get in there soon enough)

https://charliereese.ca/article/top-50-y-combinator-tech-sta...

Re: Scala projects are difficult to maintain

#147

Is the Scala language simply too big? I tried to learn it once (years ago) and quickly found myself overwhelmed by the number of concepts. I remember feeling like 80% of power of the language could have been achieved with 20% of the complexity. The latest Java releases are somewhat proving this with functional interfaces and records.

A lot of the problems with Scala echo many of the problems that people used to write about Perl codebases minus specific language quirks like typing and objects. The problem with complex, rich languages is that it doesn't guarantee anything about the wisdom of programmers to pick, choose, and abuse from the features that wouldn't be easily legible to future maintainers. Somehow Scala has a lot of the issues that I fe…

From a quick google search it looks like ts/js doesn't let you define custom operators like Scala does. Scalas implicit stuff is messy too. The original article mostly talked about libraries though

Re: Scala projects are difficult to maintain

#148
post #108

Earlier quoted context omitted.

An evergreen conversation: "I love C++." —Alice "Oh? Which C++?" —Bob Every successful C++ team defines its own C++ subset.

This is why I can't figure out how for the life of me to learn C++ effectively for professional use.

In reality it's not really like that. Yes different shops are going to be using different C++ features in different ways but they usually share some common "core" of the language.

Re: Scala projects are difficult to maintain

#149

Some of the worst and unmaintainable code I've ever seen was written in Python & Java. While some of the cleanest codebases were written in Scala and Javascript. The problem is not the language, but the team & overall approach to development (rushing to deploy bad code because your manager said so; lack of code review). Tooling can be better, but it was massively improved over last 2 years

I have seen quagmire in several languages at various small and very large companies. So many withered and bloated Java apps that is hard to maintain.

And I agree it is not the language, it is the stewardship. Who they hire, how they manage their tech, culture, pairing/mob, quality over speed etc. And the reality that all codebases rot, at different speeds depending on these factors, but eventually they all rot.

I have seen well maintained large Scala architectures, at very large organisations because of great stewardship of the projects and people.

And I have seen car-crash bundle of apps in Scala because they hired rockstar developers that incorporated every shiny feature continuously leaving it unmaintainable by the rest. Or by recent Java converts that were not mentored well enough so still writing Java code in Scala.

I love Scala but with bad HR processes and weak leadership it will ground to a halt. And they will blame the language not themselves. But the same would probably have happened with any language.

Re: Scala projects are difficult to maintain

#150

Earlier quoted context omitted.

I have found that languages that support both FP and OO paradigms its best to do things like data manipulation in FP, and use OO to encapsulate those processes and be limited to just passing messages to other objects. Avoid inheritance. Once an object is instantiated, don't change its internal state. etc.

>Avoid inheritance. Once an object is instantiated, don't change its internal state. etc. Just embrace Clojure then. You get all that enforced for you, plus the entire Java eco-system.

I'm not a huge fan of the Java ecosystem.

Clojure does look really nice and Diatomic looks pretty slick.

Have you used Clojerl? https://github.com/clojerl/clojerl

Post reply on HN