I figured out how to avoid connascence of position

Instead of passing positional arguments to constructors (or functions), instead pass a list of value objects. The type of the value object will tell you the type of the value, so you don’t need to worry about the position. This is a super powerful means of supporting back-compat within your code base so you can move ahead at speed. Having value objects instead of simple types (bools, ints, floats, strings, etc) might have performance implications, but it also can be quite handy. So far so good for my use cases.

Leave a Reply