Hacker News new | ask | show | jobs
by kenbellows 3363 days ago
Indexing into 2D containers is often an exception to the "x, then y" rule; indexes are very often specified with "row, then column"[1]. It's true that this is different to Cartesian coordinates, but grid cells aren't points or locations on a Cartesian plane, they're members of a 2D container: the grid.

1: https://en.wikipedia.org/wiki/Index_notation#Two-dimensional...

1 comments

This is also consistent with how tables are typically laid out in HTML (cells/columns inside rows). Considering that grids are supposed to be the modern/responsive/semantic/etc. equivalent of table-based layout, the conventions here are not terribly surprising.

That said, I don't tend to use the shorthands.