It’s missing the time taken to instantiate a class. I remember refactoring some code to improve readability, then observing something that was previously a few microseconds take tens of seconds. The original code created a large list of lists. Each child list had 4 fields each field was a different thing, some were ints and one was a string. I created a new class with the names of each field and helper methods to pro…
I went to the doctor and I said “It hurts when I do this” The doctor said, “don’t do that”. Edit: so yeah a rather snarky reply. Sorry. But it’s worth asking why we want to use classes and objects everywhere. Alan Kay is well known for saying object orientated is about message passing (mostly by Erlang people). A list of lists (where each list is four different types repeated) seems a fine data structure, which can b…
customers[3][4]
is a lot less readable than
customers[3].balance