Readit News logoReadit News
Rogach commented on Scala 3 slowed us down?   kmaliszewski9.github.io/s... · Posted by u/kmaliszewski
still_grokking · 12 days ago
Examples and code snippets in the official docs of course default to the new syntax, making them well readable for all people accustomed to Scala's new syntax.

> If I recall correctly, later they added a switch allowing one to choose between syntax versions in the online docs.

Stating this, which is not, and never was true creates the impression you're talking about things you have no clue about.

The point is: Removing braces really makes code much easier to read for people who get distracted by useless line noise!

> So reading unfamiliar syntax is literally harder. > […] > Source: have a degree in neurophysiology.

You need a degree to understand something such obvious? Never mind…

The point is: New syntax is only new in the first few hours of contact with it.

Anybody who uses more than one language knows that switching languages is in fact a bit distracting, but at latest on the second day you completely stop thinking about syntax, and than switching back to whatever was before is as hard as the previous switch to the current thing. Usually this happens already after a few hours for languages you already know.

As we're talking about neurophysiology: As a matter of fact filtering "noise" — irrelevant information — from sensory input is a hard task for the brain. So having less distracting useless noise in the input helps to concentrate on the stuff that actually matters!

Braces in code are 100% redundant, useless noise. The only reason they were added in the first place was to make code simpler to parse for computers, something that does not matter any more since many decades. So there is no rational reason any more to pollute code with useless, distracting noise.

Rogach · 12 days ago
I feel that I need to preface my answer with the defusing disclaimer: I understand that you love the language very much. And statements like the ones I make may hurt, because they say bad stuff about the thing you love. But getting defensive might detract from otherwise interesting discussion.

In fact, I also love Scala. I've dedicated lots of my time to working with it (almost 15 years at this point!), I've been with it since 2.8.x days. And I really lament that it fell out of favor and huge swaths of the community left.

> Stating this, which is not, and never was true creates the impression you're talking about things you have no clue about.

Of course it is possible that I have misremembered, so I went and checked. It was a mistake on my part to make such a statement and not to provide an actual link.

Not only it was that way, it actually still is. See the official Scala 3 reference: https://docs.scala-lang.org/scala3/reference/

All the code examples there use the new syntax. And I would guess that "Scala 3 reference" is the document that Scala 2 veterans (like myself) would have been using when learning about new features and contemplating migration to the new version.

> You need a degree to understand something such obvious? Never mind…

It might be obvious, but I felt that it wasn't obvious to some people (including the ones that were in charge of the documentation for Scala 3), so I wanted to expand a bit on that.

> The point is: New syntax is only new in the first few hours of contact with it.

Of course, but these "first few hours" are exactly the hours that were spent reading the documentation for the Scala 3, and I feel that making those hours harder wasn't the smart choice.

I think that Scala development team made a decision to chase growth, focusing on attracting new users and disregarding the old ones. Looks like they lost that bet - new users didn't come, and many old users were disappointed and left.

New syntax isn't the only problem of Scala 3, and probably it isn't even the biggest one. But it was the most glaring and visible issue - for me, almost every code example in the reference really felt like a spit in the face. Exactly this kind of off-hand dismissal of old-time users was one of the reasons some of the users started moving away from Scala (myself included).

> Braces in code are 100% redundant, useless noise.

The debate about "braces vs significant whitespace" is raging literally for decades. Like many similar debates, it seems that there's no "true solution" and no "true winner" - both sides have heaps of valid arguments.

I assume that both sides have their merits, and it's always a tradeoff between pros and cons of each approach. I use languages that have braces, and I use languages that use indentation - I see pros and cons of each approach. Outright dismissing the other side of the debate by saying that it's "100% useless" seems to be missing lots of nuance.

Rogach commented on Scala 3 slowed us down?   kmaliszewski9.github.io/s... · Posted by u/kmaliszewski
still_grokking · 12 days ago
The website is a private undertaking which started literally a few days ago. It's not some official complete tracker.

The point was to show that big corps are dependent on Scala, often at their core.

Scala is likely not for everybody, but where you need to write safe high level code there is more or less no alternative, not even on the horizon. Scala is simply very likely where Rust will end up after the honeymoon, when people realize that feature rich, safety first languages aren't for the mass market, where mostly only the cost of initial development counts.

Rogach · 12 days ago
True, Scala (the language) offers lots of great functionality. And Scala 3 brought some important improvements.

But safety is not the only important aspect of a programming language. For me personally the community (libraries, tools, forums, blogs, etc) became much more important over the years, and I feel that Scala 3 really hurt the community angle.

Rogach commented on Scala 3 slowed us down?   kmaliszewski9.github.io/s... · Posted by u/kmaliszewski
still_grokking · 13 days ago
> In the end it was "so bad so sad you can always reenable brackets".

This is not true.

Nobody ever proposed to replace the old syntax!

The new syntax was, and is, optional, and that's exactly like designed from the very beginning.

Rogach · 13 days ago
They didn't explicitly propose replacing the syntax, true. But to an outsider, it sure looked like the new syntax was a priority - all the examples and code snippets in the official docs defaulted to the new syntax, making them infuriating to read for someone accustomed to braces.

If I recall correctly, later they added a switch allowing one to choose between syntax versions in the online docs. But it wasn't done right from the start, and when that was finally added most of the damage was done, people already lost interest.

I understand that removing braces might feel harmless - but it really makes the code harder to read for people that use braces all the time.

If someone's brain is accustomed to seeing braces everywhere, reading code with them becomes almost automatic, handled by "low-level" parts of the brain. If the syntax is changed, then "low-level" brain areas have to pass work to "higher-level" areas, which increases energy requirements and processing latency. So reading unfamiliar syntax is literally harder.

Incidentally, that's also why many people are so picky about grammar - grammatical errors make the text noticeably harder to read.

Source: have a degree in neurophysiology.

Rogach commented on Scala 3 slowed us down?   kmaliszewski9.github.io/s... · Posted by u/kmaliszewski
still_grokking · 13 days ago
> It was a little weird it blew up in industry for a while.

It never went away. It only got more:

https://business4s.org/scala-adoption-tracker/

Rogach · 13 days ago
Wow, 34 companies with "possibly" 233 more!

I don't see the chart with changes of number of companies using Scala over time. But even without the chart - if after 15 years there are less than 300 companies in total, that's a bit depressing.

Of course legacy never goes away, and even 20 years down the line there will still be some demand for Scala programmers. Similar to how Cobol still lives on. But in my experience the language isn't growing anymore, even slowly dwindling in userbase. And this became way worse after Scala 3 mess.

Rogach commented on It's mathematically highly likely that there is life elsewhere in the universe   sciencedirect.com/science... · Posted by u/Rogach
Rogach · 22 days ago
We’re (Probably) Not Alone Out Here.
Rogach commented on Bitcoin's big secret: How cryptocurrency became law enforcement's secret weapon   bitwarden.com/blog/how-cr... · Posted by u/LopRabbit
Eddy_Viscosity2 · a month ago
USD in bank accounts is definitely fungible. They may track who sends what money to whom. But this transaction data is not tied to specific 'dollars' just to 'dollars' in general. So yes, perfectly fungible.
Rogach · a month ago
Inside a single bank - definitely. But if you have dollars in different banks then they suddenly start having very different value. Couple examples just in case:

1. Spending dollars on US soil from an US bank account won't incur extra fees (at least visible to the person - I know about interchange fees, but they are borne by the merchant), while using card issued by a foreign bank can incur fees for cross-border transactions (at the level of 2-3% usually).

2. Sanctions and KYC concerns also make different dollars have different value. Money in US bank account of an US company employee can be used at face value - money in some less-favored country bank, not so much.

Rogach commented on Bitcoin's big secret: How cryptocurrency became law enforcement's secret weapon   bitwarden.com/blog/how-cr... · Posted by u/LopRabbit
Eddy_Viscosity2 · a month ago
Echoing the other comments here, but because of the blockchain every bitcoin is effectively unique as it is defined by its history of transactions. As is pointed out by other commenters, a shadey transaction history could lead to lower value. A US dollar on the other hand is truly fungible. It doesn't carry that burden of knowing what transactions it was previously used for.
Rogach · a month ago
You mean this only for cash US dollar - i.e. physical bills? Not USD in bank accounts?
Rogach commented on Uv is the best thing to happen to the Python ecosystem in a decade   emily.space/posts/251023-... · Posted by u/todsacerdoti
gcr · 2 months ago
On these systems, wouldn’t binfmt attempt to exec(“/usr/bin/env -S uv run --script”, “foo.py”) and fail anyway for the same reason?
Rogach · 2 months ago
No. The string is split to extract at most one argument. See: https://linux.die.net/man/2/execve

So in fact "-S" is not passed as a separate argument, but as a prefix in the first (and only) argument, and env then extracts it and acts accordingly:

``` $ /usr/bin/env "-S echo deadbeef" deadbeef ```

Rogach commented on Uv is the best thing to happen to the Python ecosystem in a decade   emily.space/posts/251023-... · Posted by u/todsacerdoti
moleperson · 2 months ago
Why is the ‘-S’ argument to ‘env’ needed? Based on the man page it doesn’t appear to be doing anything useful here, and in practice it doesn’t either.
Rogach · 2 months ago
Without -S, `uv run --script` would be treated as a binary name (including spaces) and you will get an error like "env: ‘uv run --script’: No such file or directory".

-S causes the string to be split on spaces and so the arguments are passed correctly.

u/Rogach

KarmaCake day83July 7, 2013View Original