OOP's idea to bundle state and the methods that operate on it together into objects is underrated and also nuanced: nothing stops us applying global methods to global state, but we'd need more identifier prefixes. So it's easier to make related methods and state "mutually local".
-
-
I often thought, without any evidence, that Scala's stdlib collections might benefit from being more pure data structures, with no inheritance, fewer methods, and additional operations provided through extension methods.
-
Problem is w/ all optimizations. E.g. List actually has an internal "var tail", used then in ListBuffer and in all methods for quickly building lists, to avoid the "reverse" operation. If extension methods end up using internal impl details, then they aren't extension methods.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.