# Method for == without import?

**URL:** <https://discourse.julialang.org/t/method-for-without-import/1467>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 13, 2017, 6:26pm UTC](https://discourse.julialang.org/t/method-for-without-import/1467 "2017-01-13T18:26:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pint](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pint/32/125_2.png) [@pint](https://discourse.julialang.org/u/pint)\
**Post date:** [January 13, 2017, 6:26pm UTC](https://discourse.julialang.org/t/method-for-without-import/1467/1 "2017-01-13T18:26:32Z")

</div>

so i tried

```julia
Base.==(...) = ...
Base.(==)(...) = ....
function Base.==(...) ...
function Base.(==)(...) ...

```

to no avail. if i import Base.==, then all of the above works without _Base_. not a big deal, but would be nice without. btw this also works, but would not want to use it either

```julia
e = :(==)
@eval Base.$e(...) = ...

```

good luck googling == 🙂. github didn’t give any hits either

---

<div class="post-metadata">

**Author:** ![Evizero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evizero/32/10118_2.png) [@Evizero](https://discourse.julialang.org/u/Evizero)\
**Post date:** [January 13, 2017, 6:30pm UTC](https://discourse.julialang.org/t/method-for-without-import/1467/2 "2017-01-13T18:30:50Z")

</div>

```julia
julia> immutable Foo end

julia> Base.:(==)(::Foo, ::Foo) = error("bar")

julia> Foo() == Foo()
ERROR: bar
Stacktrace:
 [1] ==(::Foo, ::Foo) at ./REPL[23]:1

```
