Vlad's Roam Garden

Powered by 🌱Roam Garden

prefer structure over convention

People can ignore conventions or not be aware of them. On the other hand, structural constraints in the code are far more discoverable and automatically enforceable.

It's usually easy to get your tools to tell you what you're doing wrong and how you can fix it.

Structure sometimes can be too rigid though

in the spirit of the 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.