It should be easy to keep related things close together in the codebase. This gets very hard when considering the expression problem, as it sometimes becomes necessary to split things up by vertical/horizontal.

Things that should be co-locatable

Things that maybe should be co-locatable

  • co-locatablity of routes with their server implementations

Beyond the file paradigm

Co-location becomes a somewhat meaningless concept when one is able to work with graphs because anything can be related to arbitrarily many things as opposed to being limited by a file. Unison comes fairly close to achieving this by storing every function individually in a database.