2
kira
6y

Fuck you arrays.
Why the fuck you want to start with '0'? Ohh I forgot If you will start with '1' then you can't fuck with us. Let it be you f***

Comments
  • 6
    Why is it a problem they start with 0?
  • 2
    Man. No.
  • 1
    @gitpush now we have logical session in my internship, where I have to mostly deal with arrays and for loops. It sucks when I trace the code and I get confused xD
  • -1
    @donnico why no man. Imagine if it will start with 1, Lot's of things will be easy. I guess for me at least XD
  • 1
    @thesagya ash I see lol well good luck 😀
  • 1
    What would be easy? It's illogical and counterintuitive. Number start from zero.
  • 1
    @donnico natural numbers starts from 1
  • 0
    @Mayank007 yes bond :)
  • 0
    @fuck2code whatever, but please we genuinely count from 1. So it would be better if array's counting start from 1.
  • 0
    @fuck2code I'll check it out this vdo.
  • 5
    Array indexes are not a position, they are an *offset*. Once you get your head around that difference it all makes sense.
  • 0
    @AlpineLinnix why? Generally, suppose if you want to count 10 numbers then how will you count 1 to 10 or 0 to 9?
  • 0
    @Mayank007 ARE YOU SERIOUS?

    Natural numbers start from 0.

    Positive integers start from 1.

    @thesagya look at the comment of @Zaphod65.

    Have you ever worked with C and pointers? If not, give it a try, you'll immediately understand why arrays start at 0 and not with 1.
  • 0
    @fuck2code A natural number is a number that occurs commonly and obviously in nature. As such, it is a whole, non-negative number. The set of natural numbers, denoted N, can be defined in either of two ways:

    N = (1, 2, 3, 4, ...}

    N = {0, 1, 2, 3, ...}

    You are right but i am not wrong :)

    // check the brackets of number notation too.
  • 1
    @fuck2code I don't really see difficulty of implementing same thing if you start from 1. He just assumed it would start from 0 and didn't even gave a chance to 1. All of his issues came from his preconception as a software developer that numbers start from 0. I mean, why not go from -74? Seems just as natural to me: "Please give me second item from this array - array[-73]". Yep, this is just as ridiculous as array[1] for second item. Second = 1, lel.
  • 1
    @taglia Numbers starting from zero are whole numbers. Numbers starting from one are natural numbers(the ones we use for counting).
  • 1
    @fuck2code there might be difference between standards i guess but what i was taught in school is this.
  • 1
    @fuck2code it's just a naming for positive set of integers and i guess you know how flexible naming convention can be.
  • 3
    Think about it this way: the index is a memory offset

    arr[4] == *(arr + 4)
    arr[1] != *(arr)
  • 2
    Lol you must be new.
  • 1
    @thealex yes. I like to be in learning phase at least in programming. I am not master :)
  • 0
    @Mayank007 TL;DR: 0 is part of â„•.

    From wikipedia:

    "Some definitions, including the standard ISO 80000-2,[1] begin the natural numbers with 0, corresponding to the non-negative integers 0, 1, 2, 3, …, whereas others start with 1, corresponding to the positive integers 1, 2, 3, ….[2][3][4][5] Texts that exclude zero from the natural numbers sometimes refer to the natural numbers together with zero as the whole numbers, but in other writings, that term is used instead for the integers (including negative integers).".

    Standard ISO 80000-2, which is the evolution of 31-11 (https://en.wikipedia.org/wiki/...), state:

    "â„• -> the set of natural numbers; the set of positive integers and zero

    â„• = {0, 1, 2, 3, ...}

    Exclusion of zero is denoted by an asterisk:

    â„•* = {1, 2, 3, ...}"
  • 2
    @thesagya at the beginning it was weird for everyone, but then, when you end up using memory addresses, it all makes sense :)
  • 1
    @taglia yeah thats what i said it could be difference of standards.
Add Comment