Hacker News new | ask | show | jobs
by Honzo 3364 days ago
Ah I'm thinking of it wrong. The indexes are not the boxes but the splits in between.

| <- 0 1 -> | <- 1 2 -> | <- 2 3 -> |

That makes more sense.

1 comments

You're halfway there. The indices are the grid lines, but they're also one-indexed. That's consistent with other parts of CSS, though it's inconsistent with the rest of the programming world.
Julia, R, Matlab, Basic and Fortran disagree.

It's just that C's heavy influence resulted in most languages with arrays being 0 indexed.

APL disagrees too. Except when it doesn't.