Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Scala comes very close to that.


Scala is nowhere near as approachable as Python or Typescript


Why do you think that?


At least when I used it ~2 years ago: an extremely complex type system with a huge learning curve (unless you're going to just write Java in Scala), poor documentation, and a very slow compiler. That's to say nothing of the JVM-based runtime.


I got really frustrated one of these days because I reached the 20-something limit for fields in a case class and I had to change a lot of my architecture. It was a Spark job so I needed all those fields in that structure.

Not sure if that's because I'm a beginner or if it's just Spark itself, but Scala errors are impossible to decrypt.


Ah yeah, that was really a stupid limit.

Time to bump Scala to version 3 so that you don't have the 22 case class field limit anymore. :)

See here: https://dotty.epfl.ch/docs/reference/dropped-features/limit2...


> unless you're going to just write Java in Scala

That is what I mean though - but I would replace "Java" with python here. Just stay away from all the complexity and write python code. It's pretty simple and some people argue it's the better way to use Scala.


Scala’s implicits, mutable/immutable collection bifurcation, infix/dot syntax interchangeability for method invocations, tendency of libraries to implement their own mini language, ...


As a beginner, you don't really have to use Scala's implicits or "infix/dot syntax".

Just like how you don't have to use type annotations, generators, decorators, context managers in python.

Same for libraries.

At some point you will stumble upon a library that forces you to understand them or you even write one yourself, but that is not something that stops you in the beginning.


It does.

Go got this right. If you want to read code, contribute to a large code base, folks will be using the features of the language, including the weird ones. Go has kept things very simple (relatively) in terms of core language. Some things were beyond basic (error handling? no generics?) But boy did it make it easier for contribute and understand code.

def Hi() = "hi" Hi() Hi

Yes, those two variants both work?


> If you want to read code, contribute to a large code base

Sure, but in that case, is python really beginner friendly? I don't think so. I had the impression we were talking about starting out with the language and building the well-known todo-list to learn the basics.

Also, golang is a rather young language and it will go the way that all languages go: it will get more and more complex because the more experienced developers want to improve their productivity with better language features. Remember the "no generics" thing? Well, now the generics will be added - I predicted this to happen. And just wait, other features will follow...


It was originally. But agreed, less so now.

They've been adding some really more edge / line noise type features. Consider the walrus operator? You can do pretzel magic with this which make figuring out scope and what happened to what difficult.

I love the old way.

with open(…) as f: for line in ...

And I wish they'd just made more things iterable maybe or fixed some of the regex match stuff?


the JVM is an incredibly heavyweight runtime compared to CPython. I don't think we're going to find the next beginner-friendly language coming out of the most professional runtime in human history.


True, but I don't think that is what the OP was taking about. The language itself is rather independent of the runtime. Scala compiles to native code or Javascript as well.


> incredibly heavyweight runtime

The apps may be heavyweight, but the runtime was designed to run on set-top boxes 25 years ago.


The JVM is definitely memory hungry (excluding cherry-picked examples such as 'set top deployments' or the Java Ring from the 90s), moreso than any other language runtime referenced in this discussion.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: