Vlad's Roam Garden

Powered by 🌱Roam Garden

prefer structure over convention

People can ignore convention or not be aware of it, the structural constraints on the code are on the other hand far more discoverable and automatically enforceable.

Structure sometimes can be too rigid though

in the spirit of example below - think all the classes in java throwing "not implemented" error.

This exposes the temporal coupling by creating a bucket brigade. Each function produces a result that the next function needs, so there is no reasonable way to call them out of order.
You might complain that this increases the complexity of the functions, and you’d be right. But that extra syntactic complexity exposes the true temporal complexity of the situation.
Note that I left the instance variables in place. I presume that they are needed by private methods in the class. Even so, I want the arguments in place to make the temporal coupling explicit.