← Back to context

Comment by tantalor

3 days ago

> Notice how the decoded values give relative positions, each value represents the difference from the previous position, not absolute coordinates. This is crucial: instead of encoding large column numbers like 27698 in minified files, source maps only store small deltas like +7 or +15, making the encoded strings much more compact.

Wouldn't "offset" be a more apt term?

To me, “offset” sounds more like the distance from the start, whereas here the values are relative to the previous segment. Not a native english speaker, so I could be wrong.

Delta and offset mean the same thing — the difference between two amounts.

Delta is perhaps slightly more obscure outside of a math setting. Perhaps.

  • I feel like choosing the synonym that happens to be one letter shorter when the operation is literally intended to track things in a way that's more conscise is about as "apt" as it could be!