4 ms·
The slippery slope toward Scala's operator madness. Much of the value of a language can be its simplicity and grokability by typical devs. Please find a sensibl
by twistedpair 5y ago
The slippery slope toward Scala's operator madness. Much of the value of a language can be its simplicity and grokability by typical devs. Please find a sensible stasis.
Checkout this list of new JS/Node.js features [0] as an example.
Will a world with the following be an improvement? [1]
• ??=
• ||=
• &&=
And don't forget the strife around the Python "walrus operator" := [2]
[0] https://node.green/ https://node.green/
[1] https://github.com/tc39/proposal-logical-assignment/ https://github.com/tc39/proposal-logical-assignment/
[2] https://realpython.com/python-walrus-operator/ https://realpython.com/python-walrus-operator/
- lyjackal 5y agoI feel like this is spreading misinformation about scala. Those are not operators, rather methods. It’s syntax rules are fairly simple to reason about. The problem here is more the growing language syntax complexity of JavaScript That being said, just because you can name a method ‘||=‘ in scala, doesn’t mean you should. A lot of us scala devs realize that it’s not very readable. Symbols as method names should be used rarely if at all. But One can write unreadable code in most any language with poor naming, and that’s all this is
- twistedpair 5y agoI <3 Scala a great deal. Wrote it professionally for years and did just as you suggest; set rules about what patterns were acceptable and not. Regardless, the common critique against Scala is that of an impenetrable haven for type astronauts, such as the Admiral Ackbar operator.