82
tahnik
8y

Colleague: I really wish array index in all languages would start from 1. If I ever write a language the index will start from 1.

Me:

Comments
  • 13
    Lua :)
  • 6
    It'd confuse us existing programmers, but it would make learning programming easier and remove the need for having inclusive start indexes and exclusive end indexes for substring and the like
  • 1
    @dfox And that fact irritates me
  • 1
    A 0 index makes loops easier for me... ew
  • 2
    I think new programmers would find it more instinctive. I remember well when I started programming, this was a little bit confusing. Of course it would be a mess for us oldies.
  • 2
    There's a performance reason for zero based index you know.
  • 0
    Sure and just screw with math to make it easier on a new generation that thinks it would be easier until they are having some seriously screwed up indexing issues and have to work out wrapping their minds around that solution.
Add Comment