3 ms·
Take Scala collections. These are written using builders and if-else checks of emptiness which are definitely not idiomatic. Authors of the std-lib did them fo
by vletal 5y ago
Take Scala collections. These are written using builders and if-else checks of emptiness which are definitely not idiomatic. Authors of the std-lib did them for you so you do not have to. That is not a red flag.
- bborud 5y agoThe other way around: non-idiomatic use of a language in its standard library points to weaknesses in the language. If emptiness is something that is so important you add extra branchpoints inside collections to check for it, there ought to be some way of disallowing emptiness or {nil,null}ness in the language itself. Sure, it is nice for people who use the standard library, but it points to things in the language that perhaps should have been given some more thought.
- hvidgaard 5y agoI'm not sure I would call it a weakness. Performance vs expressiveness and maintainability will always be a trade off. It could be a weakness, but it's just as likely that it was a deliberate trade off.