# What's the big deal? 0 vs 1 based indexing

**URL:** <https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102>\
**Category:** General Usage\
**Created:** [December 22, 2016, 2:20pm UTC](https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102 "2016-12-22T14:20:49Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![spaceLem](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spacelem/32/217628_2.png) [@spaceLem](https://discourse.julialang.org/u/spaceLem)\
**Post date:** [March 17, 2021, 1:00am UTC](https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102/13 "2021-03-17T01:00:44Z")

</div>

I found C++ slightly easier to work in when using 0-based indexing, but then I was using n-dim arrays that I was hand indexing.

Pretty much every other programming language I’ve encountered and worked in as a mathematician is 1-based (R, MatLab, Octave, Fortran, Maple, and Maxima) has provided tools for working smoothly with n-dim arrays, and with that in place I find 1-based much more natural and less to think about. The first item is 1, the 2nd 2, the n-th n… in my mind the 0th thing in a collection is when you have an empty set so the thing doesn’t actually exist.

I guess if you’re counting counts then you might need the number of times 0 happened, but then you might want the number of times a thing happened in the years 1967-2021, then you’re out of luck either way (except that Julia handily gives you a solution to that).

---

_[View the full topic](https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102)._
