4

In an object/dictionary/map config object where multiple source paths are mapped to destinations, which structure makes more sense to you (and why)?

1. { "src/path.ext": "dest/path.ext" }
2. { "dest/path.ext": "src/path.ext" }

Could also be a URI redirect map

Comments
  • 8
    Destination should be the key because you wouldn't map multiple destinations to one source.
  • 0
    @spongessuck ok my only counter argument would be if it can be safely assumed that there is only a single source, left-to right (from -> to) reads somewhat more naturally (for most western languages at least). But fair enough!
  • 0
    Sure it's confusing to read but that's better than confusing to use.
  • 1
    I like cotton eyed joe notation.

    "Where do you come from where do you go cotton eyed joe."
Add Comment