Daily reminder

Attached: images(17).jpg (500x440, 31K)

Ints start at zero so why should arrays start at one?

The array index is how many spaces away from the pointer to the front of the array you are referring to. If the array index is zero, you add zero spaces to where the pointer is, and therefore are referring to the the front of the array.

Attached: ree.jpg (720x762, 34K)

ordinal numbers start at 1

Integers don't "start" at anything.

How about in languages that don't have pointers?

get this out of here, it does not uphold the data abstraction principle.

0 is the absolute reference

Only good thread on /g in weeks.

Attached: 1549950231905.jpg (426x364, 46K)

I now understand how the SJWs feel.

who gives a fuck about pointerless languages lmao are u a new age faggot

wouldn't it be the same, just more stuff goes on behind the scenes, because you can't directly access the pointer the way you would in a language that has them?

Please stay in /s4s/, firend.

Unsigned integers start at zero.

I consider C and Unix the birth of modern computing (I'm aware Lisp, and Fortran predate it). Jan 1 1970 is a date burned into computing and my brain. so is starting at 0.

if you think of array indices as memory addresses, 0x000000.... is a memory address. starting arrays at zero mimics a low-level way of thinking and imagining the memory model. diverging from that for the sake of abstraction is niggerlicious

Even if there are no pointers, you still need to store array indices, which act like pointers.

i can't. 1 indexing is better.

Computers don't work like a human mind. When you write software, you should be always aware of that fact. Thus, starting arrays at 1 is a useless abstraction only liked by clueless idiots who like to pretend that their software doesn't run on an actual physical computer.

it's nothing to do about how the human mind works, it's about how logic and set theory work.

if an ordered collection has a cardinality of n, then there should be an item assigned to the nth ordinal instead of topping out at n-1.

...

First element has 0 offset

wew the irony

Attached: 1496895036681.jpg (479x615, 39K)

go on

>First element has 0 offset
an empty array has 0 offset, an array with one element has 1 offset

what the fuck are you even saying?

Well, Lua agrees with you. I like Lua. But 0 makes more sense for programming.

I do not intend to change your mind. But the faggots with their minds addled by C will waste their time with you.

all languages have pointers, they're just implicit in most of the new ones

Well, I do keep adding dumb bugs because I got the indexing wrong every now and then.
But on the other hand those bugs are also super trivial to fix so it doesn't really matter that much.

do you code in binary?

I used to have one of those fucks as coworker. He never got anything done because he was always busy being autistic about some trivial shit rather than just doing his job.

All languages use pointers, you're just usually abstracted from them.
1 indexed arrays are still 0 indexed, it's just shifted. You could have 10 indexed arrays if you want. 22 indexed. In the end, when it is compiled or interpreted it'll still convert to a 0 index.