# Should we disallow non-compliant \`AbstractUnitRange\`s where \`typeof(step)\` doesn't match the \`eltype\`?

**URL:** https://discourse.julialang.org/t/should-we-disallow-non-compliant-abstractunitrange-s-where-typeof-step-doesnt-match-the-eltype/101695
**Category:** Internals & Design
**Tags:** speculative, range
**Created:** [July 17, 2023, 2:58pm UTC](https://discourse.julialang.org/t/should-we-disallow-non-compliant-abstractunitrange-s-where-typeof-step-doesnt-match-the-eltype/101695 "2023-07-17T14:58:01Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [July 17, 2023, 8:13pm UTC](https://discourse.julialang.org/t/should-we-disallow-non-compliant-abstractunitrange-s-where-typeof-step-doesnt-match-the-eltype/101695/8 "2023-07-17T20:13:33Z")

</div>

> [@1 + 'a' = 'b'](https://discourse.julialang.org/t/1-a-b/77947/35):
>
> For the mathematically inclined, +(::Char,::Int) forms a [group action](https://www.wikiwand.com/en/Group_action) of the (additive) group of integers on the set of characters. Similarly +(::Ptr{T},::Int) is a group action of integers on pointers and +(::Int,::Int) is the usual group action of integers on themselves, namely the (additive) group operation on integers. So this is all consistent and legit from a mathematical point of view.

But probably should be

> `'a' + NextCharacterInTermsOfUnicodeCodepoints(1)`

> [@1 + 'a' = 'b'](https://discourse.julialang.org/t/1-a-b/77947/82):
>
> This is a very interesting discussion. I especially like the mathematical explanation by @cjdoris considering it as group action. For me the main concern seems to be that the group action is just denoted by an integer. For instance, in the example Date(2022, 3, 16) + Day(1) it is clear that Day(1) denotes a time interval/shift. In this interpretation 'a' + 1 should be understood and maybe explicitly written as 'a' + NextCharacterInTermsOfUnicodeCodepoints(1) being open to suggestions for a…

---

_[View the full topic](https://discourse.julialang.org/t/should-we-disallow-non-compliant-abstractunitrange-s-where-typeof-step-doesnt-match-the-eltype/101695)._
