4 ms·
It was absolutely amazing how stubborn and ridiculous the whole bracket-less syntax change was handled. It was basically a dictatorial decision that they preten
by monksy 11mo ago
It was absolutely amazing how stubborn and ridiculous the whole bracket-less syntax change was handled. It was basically a dictatorial decision that they pretended to be a community decision. It was just pushed and tons of people voiced their disapproval. In the end it was "so bad so sad you can always reenable brackets".
They did it to try to appeal to Pythonists.. turns out that wasn't why Pythonists didn't use scala in the first place.
- dionian 11mo agoI think it’s nice to be able to use it. But like pretty much everything in scala, it’s a huge smorgasbord of things from which you can choose. I personally don’t use that syntax, but it’s cool that I can and sometimes I do just for fun.
- jll29 11mo agoA language should not be complicated. (Wish Odersky, capable as he is, kept working on his much-verlooked TurboModula). Simple: - Scheme - C - Pascal - Go - Lua Complicated - PL/1 - C++ 2024 - Scala 3 Still borderline or beyond? - Rust - Java (>850 pp. lang. specification...)
- still_grokking 11mo agoExtremely weird list. The Scala spec is much shorter than the C spec… Also it's of course much shorter than Rust, where nobody has a real issue with its complexity, at least nobody is complaining really loudly. The C and Go specs are actually extremely involved, long, and complex given that the languages almost don't have any features at all. But comparing language specs isn't a 100% fair metric. One should instead look at formal language semantic definitions written all in the same way. If you look at these you will for example learn that the C semantics are much more complex than for example Java. Check out https://kframework.org/ https://kframework.org/ to learn more. (A list of semantics for different languages can be found on the "projects" sub page).
- still_grokking 11mo 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 11mo agoThey 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.
- still_grokking 11mo agoExamples 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.