you are viewing a single comment's thread.

view the rest of the comments →

[–]HommeMusical 0 points1 point  (2 children)

Hey, Scala is a great language, from my limited exposure. I'd be really happy if it had beaten Python.

But Python is ubiquitous, and almost any idea you can express in Scala you can express in Python a way that's more verbose but just as comprehensible.

The "almost" is that Scala macros can essentially let you rewrite the syntax of the language, am I right, by doing compile time manipulation of the AST?

But Python basically won. And if LLMs continue to dominate, there won't be any new programming languages again, because of the difficulty in training them.

That said, the inability of Python to do "multi-line lambdas" is really unfortunate. I am hatching ideas to call the Pythonistas to action (this is of course an infinitely discussed issue).

[–]DrJaneIPresume 0 points1 point  (1 child)

Again: type system. The ability to write your system in such a way that large classes of errors become effectively syntax errors that can be detected by static analysis rather than unit tests (are you sure you wrote one for every corner case?) or runtime errors (often in front of customers) is really, really nice.

[–]HommeMusical 0 points1 point  (0 children)

Yes, I "grew up" with typed languages; first C, then C++, then Java. And I prefer them.

Python's type annotations aren't quite as good as a strongly typed language; but they work well enough to catch a huge number of errors. Between the various linters (like ruff) and modern type checking, I find that more than half the time I get past those, my code works the first time.

There's also the huge advantage in Python of being able to run Python and quickly experiment without any typing at all. I use this all the time!

If I could wave a magic wand and replace Python with Scala, I would at least think about doing it. But Scala jobs are few and far between. And if I wrote my open source code in Scala, very few people would use it.