# The colon punctuation: Why doesn't 5:1 return \[5, 4, 3, 2, 1\]?

**URL:** <https://discourse.julialang.org/t/the-colon-punctuation-why-doesnt-5-1-return-5-4-3-2-1/107676>\
**Category:** New to Julia\
**Tags:** question, range, unitrange\
**Created:** [December 15, 2023, 4:51pm UTC](https://discourse.julialang.org/t/the-colon-punctuation-why-doesnt-5-1-return-5-4-3-2-1/107676 "2023-12-15T16:51:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 15, 2023, 4:55pm UTC](https://discourse.julialang.org/t/the-colon-punctuation-why-doesnt-5-1-return-5-4-3-2-1/107676/2 "2023-12-15T16:55:46Z")

</div>

> [@Tetrakai](#):
>
> But why does it say` 5:4`?

> [@Empty range has first element, bug or feature?](https://discourse.julialang.org/t/empty-range-has-first-element-bug-or-feature/105236/7):
>
> It’s pretty important because it allows you to return useful information from searches where the result is an empty range, because the start of the range tells you the location. For example, searching for word boundaries returns an empty range that has a location: julia\> findnext(r"\b", "foo bar", 2) 4:3

> [@Tetrakai](#):
>
> And why not have it automatically switch the sign if a \> b?

By the same token, if `5:4` meant `5:-1:4` as you suggest, then it would be impossible to express empty ranges.

---

_[View the full topic](https://discourse.julialang.org/t/the-colon-punctuation-why-doesnt-5-1-return-5-4-3-2-1/107676)._
