# Custom index arithmetic

**URL:** https://discourse.julialang.org/t/custom-index-arithmetic/14374
**Category:** Internals & Design
**Tags:** question
**Created:** [August 31, 2018, 4:55pm UTC](https://discourse.julialang.org/t/custom-index-arithmetic/14374 "2018-08-31T16:55:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [August 31, 2018, 8:24pm UTC](https://discourse.julialang.org/t/custom-index-arithmetic/14374/2 "2018-08-31T20:24:02Z")

</div>

We currently assume that `axes(A::AbstractArray, i) <: AbstractUnitRange` in lots of code (so even tighter than your range assumption), and we also expect axes to have integer elements. I think you’re safe to assume the same. A custom “array” that breaks this will already be in lots of deep water and I’d say they’re fine swimming out there on their own.

---

_[View the full topic](https://discourse.julialang.org/t/custom-index-arithmetic/14374)._
