3 ms·
I love Scala by the way and have written hugs code based on it. However the reason why Scala can encourage bad code from smart people is that it allows people t
by asimpletune 5y ago
I love Scala by the way and have written hugs code based on it. However the reason why Scala can encourage bad code from smart people is that it allows people to max out their budget for writing smart code.
It’s like, let’s say it requires 2x more intelligence budget to read/debug than it is to write code. So if we all have more or less an intelligence budget of like 10, maybe some it’s 12 or others even 15-20, and you write crazy intelligent Scala, like at a 6, then you’ve already maxed out most peoples ability to read and debug the code, as we all more or less have a 10.
Scala let’s you write code that maxes out these budgets if you’re not careful. Sometimes, very rarely, it’s necessary, but most of the time there is a simpler, dumber way to do the same thing that is actually much better.
For most of my career in Scala, when I had conflict with other engineers, it was over this kind of stuff. They insisted on using cats or scalaZ or writing these crazy complicated, overly generic abstractions, and it’s like… I get what you’re doing and even I think it’s stupid and could just be done more directly and more attainably for other people.
- esarbe 5y ago> For most of my career in Scala, when I had conflict with other engineers, it was over this kind of stuff. They insisted on using cats or scalaZ or writing these crazy complicated, overly generic abstractions, and it’s like… While I kinda agree that you have to be careful with your abstractions, I see no harm getting familiar with some of the concepts that these libraries use. Being able to just implement a Monoid and then use it to do nested aggregation in maps is pretty neat, for example.