Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Did you read Dijkstra's article?

Yes, I did. Does it hurt to offer a different perspective? I feel it doesn't. Approaching a subject with an open mind or from a different angle tends to be good for discussion. Offering a contradicting opinion or observation helps everyone to understand an issue better.

> Oh, and obviously 0 is even.

I might counter this with a similar question you asked me: "did you read my post?" I didn't make a case that 0 was odd, I asked how I should look at it: as element 0, or as the first element. If you look at it as element 0, the first element of the vector is an even element. If, on the other hand, you look at it as the first element, you will think it is an odd element. This is the case I made, not that 0 is even.



> Yes, I did. Does it hurt to offer a different perspective?

No, I was questioning whether you had considered his arguments at all, given the "why do we start counting at 0" question which he tried to answer.

> I didn't make a case that 0 was odd, I asked how I should look at it: as element 0, or as the first element.

You can look at it either way, as both are correct.

> If you look at it as element 0, the first element of the vector is an even element. If, on the other hand, you look at it as the first element, you will think it is an odd element.

Ah, I see your point now. To me this wouldn't be a question because everyone knows programmers start counting at 0 -- a machine instruction would operate on indexes, not ordinals. "The first element" is the element with index 0. It is not "element number one", or if you do want to see it that way, "number one" is the ordinal you use when you start counting on your fingers, which is something we deliberately ignore.


> No, I was questioning whether you had considered his arguments at all

Ah, yes. No, I wasn't trying to disprove him. I just gave a different approach to the issue. My mind is not made up on this subject. I've been a programmer for too long: 0 is burned in my fingers and my mind.

> a machine instruction would operate on indexes, not ordinals

The interesting aspect isn't the difference between indexes and ordinals, but the difference between indexes and cardinals. The cardinals match the ordinals for normal people. For normal people, indexes have no meaning.

But the difference between indexes and cardinals aren't that easy for programmers either. In an example presented by Dijkstra a young programmer used 0 in everyday language as a cardinal replacing 1. Indexes have little meaning in real life, but cardinals do.

Good response, BTW. Thanks. It's interesting to link the concepts of ordinals and cardinals to the discussion.


> I didn't make a case that 0 was odd, I asked how I should look at it: as element 0, or as the first element.

element 0, aka the 0th element..




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: