# What happened to the \`..\` operator?

**URL:** https://discourse.julialang.org/t/what-happened-to-the-operator/107224
**Category:** General Usage
**Tags:** operator
**Created:** [December 6, 2023, 4:12pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224 "2023-12-06T16:12:19Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)
#### Post date: [December 6, 2023, 4:12pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/1 "2023-12-06T16:12:19Z")

</div>

I was trying the example from [Makie for a Streamplot](https://docs.makie.org/stable/reference/plots/streamplot/#examples) which involves the `..` operator which is listed as an operator in the [docs](https://docs.julialang.org/en/v1/manual/mathematical-operations/#Operator-Precedence-and-Associativity).

However, on `Julia 1.9.4` I receive

```julia
julia> 1..42
ERROR: UndefVarError: `..` not defined
Stacktrace:
 [1] top-level scope
   @ REPL[1]:1

```

I remember that this code used to work on my machine some time ago.

---

<div class="post-metadata">

### Author: ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)
#### Post date: [December 6, 2023, 4:14pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/2 "2023-12-06T16:14:39Z")

</div>

It’s from a package: [GitHub - JuliaMath/IntervalSets.jl: Interval Sets for Julia](https://github.com/JuliaMath/IntervalSets.jl)

---

<div class="post-metadata">

### Author: ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)
#### Post date: [December 6, 2023, 4:15pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/3 "2023-12-06T16:15:54Z")

</div>

Julia defines symbols that can be used as operators, but they aren’t all implemented in Base.

---

<div class="post-metadata">

### Author: ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)
#### Post date: [December 6, 2023, 4:21pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/4 "2023-12-06T16:21:02Z")

</div>

Thanks! Has that moved around in the past? On this [SE post](https://stackoverflow.com/a/63484524/10456105) the suggested package is [IntervalArithmetic](https://juliaintervals.github.io/IntervalArithmetic.jl/stable/) which gives

```julia
julia> 1..42
[1.0, 42.0]

```

which did not work for me

while `IntervalSets.jl` gives

```julia
julia> 1..42
1 .. 42

```

---

<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: [December 6, 2023, 4:44pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/5 "2023-12-06T16:44:21Z")

</div>

_Any_ package can choose to define `..` to mean whatever they’d like. Looks like there are eight registered packages that do so right now: [JuliaHub search for `..`](https://juliahub.com/ui/Search?q=..&type=symbols&u=define&t=function) (although with this funny search string it looks like we’re not previewing quite the correct line here — click the filename to see the larger context). If you are `using` more than one of them you’ll be asked to qualify which meaning you want.

---

<div class="post-metadata">

### Author: ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)
#### Post date: [December 6, 2023, 4:55pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/6 "2023-12-06T16:55:02Z")

</div>

Note that the documentation you got `..` from was the Makie documentation, and Makie exports `..` (re-exported from IntervalSets.jl).

When you are trying to reproduce code you find in a package’s documentation, you should probably have that package loaded.

---

<div class="post-metadata">

### Author: ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)
#### Post date: [December 6, 2023, 9:11pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/7 "2023-12-06T21:11:53Z")

</div>

Hm that seems to be the trouble - one of the packages in my workflow seems now to export the `..` operator and thus the undefined behaviour.  
I must have overlooked the warning that multiple packages export `..`.

---

<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: [December 6, 2023, 9:33pm UTC](https://discourse.julialang.org/t/what-happened-to-the-operator/107224/8 "2023-12-06T21:33:51Z")

</div>

After loading all your packages, you can do a `using Makie: (..)` to explicitly state that that’s the one you want.
