3 ms·
It’s interesting that your definitions of complexity and simplicity are very different from Hickeys. In “Simple made easy” he defines complexity as entanglemen
by dgb23 3y ago
It’s interesting that your definitions of complexity and simplicity are very different from Hickeys.
In “Simple made easy” he defines complexity as entanglement and simplicity as the opposite of that.
A proper union Option = T|None, is simpler than a sum type Option<T> = Option{T, None}, because the latter complects the types into a container. It’s even worse with nominal types because it complects both yhe structure and the name.
I think you think of complexity of language implementation (compiler) or runtime complexity?
That’s a fair argument! It highlights a different preference.
- gavinhoward 3y agoI meant that, but I also meant the definition he uses. Yes, it "complects" the types into a container, but then you write code to handle the container, and only the container, until you are ready to open it up. With union types, you must write code to handle all types in the union always. This complects the code written in the language. It is also an obvious entanglement and meets his own definition of complex.