# Strange behavior of intersect() when applied to ranges

**URL:** <https://discourse.julialang.org/t/strange-behavior-of-intersect-when-applied-to-ranges/22313>\
**Category:** General Usage\
**Created:** [March 25, 2019, 5:24pm UTC](https://discourse.julialang.org/t/strange-behavior-of-intersect-when-applied-to-ranges/22313 "2019-03-25T17:24:07Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [March 25, 2019, 10:01pm UTC](https://discourse.julialang.org/t/strange-behavior-of-intersect-when-applied-to-ranges/22313/9 "2019-03-25T22:01:22Z")

</div>

I suppose that empty ranges could retain independent start and stop values but what would the advantage be? The current behavior allows the length of a range to always be computed as `stop-start+1`. It also normalizes empty ranges starting at a given index.

---

_[View the full topic](https://discourse.julialang.org/t/strange-behavior-of-intersect-when-applied-to-ranges/22313)._
