# 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:** 5

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)\
**Post date:** [December 22, 2016, 6:41pm UTC](https://discourse.julialang.org/t/whats-the-big-deal-0-vs-1-based-indexing/1102/5 "2016-12-22T18:41:23Z")

</div>

One interesting kernel, sometimes lost in the flamewars, is that the choice comes down to a preference for counting (1-based) versus offsets (0-based). Mathematically-focused languages understandably care most about counting, so the natural choice is 1-based (Fortran, Matlab, etc.). System languages dealing directly with memory tend to care most about offsets, so have usually been 0-based. Obviously there are counter-examples, but that’s the best explanation I’ve heard.

Also worth pointing out that many people have been working hard on abstractions for Julia that allow considerable flexibility in this area, see: [Generalizing AbstractArrays: opportunities and challenges](http://julialang.org/blog/2016/03/arrays-iteration)

---

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