Hacker News new | past | comments | ask | show | jobs | submit login

No, this is a quirk of the English language that I'm not sure how to describe generally. Best I can do:

"Dimensions" plural agrees with "zero" as a count, so that reads as "the count of dimensions is zero".

But they used singular "dimension" with "the" which treats "zero" as an adjective. It means "the dimension that is zero".




> "Dimensions" plural agrees with "zero" as a count, so that [always?] reads as "the count of dimensions is zero".

Out of curiosity, how do you rate each of:

"Arrays can have a zero dimension."

"Arrays can have two zero dimensions."

"Arrays can have some zero dimensions."

"Arrays can have zero dimensions."

in this regard?


The first three I read like "__ dimensions that are zero", the last one useless/borderline gibberish - it sounds like "isn't that just an int, not an array of ints?"

So yeah, my description above is a bit off, I guess it's the articles that do it? Is "some" considered an article?


> "isn't that just an int, not an array of ints?"

A two-dimensional (int[x][y] not int[]...[2]...[]) "array of" int isn't really a array of ints either - it's a array of arrays of int. So a zero-dimensional "array of" int is a int.

I'd call the last one ambiguous: it's either a group of (dimensions that are zero), or a (group of dimensions) that is [of group size] zero, and the text doesn't provide enough information to know which without context, just like "I read books." when you don't whether someone's talking about their hobbies or what they did over the summer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: