# Intialize types and define operators within them

**URL:** <https://discourse.julialang.org/t/intialize-types-and-define-operators-within-them/15435>\
**Category:** New to Julia\
**Created:** [September 24, 2018, 7:51pm UTC](https://discourse.julialang.org/t/intialize-types-and-define-operators-within-them/15435 "2018-09-24T19:51:29Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [September 26, 2018, 12:56pm UTC](https://discourse.julialang.org/t/intialize-types-and-define-operators-within-them/15435/21 "2018-09-26T12:56:31Z")

</div>

Ok. It the call types seem consistently overwritten by any new function I define, so confusions can only arise if I try to call a function which was not defined to be called that way. I mean:

```julia
struct test
  a::Int64
  test() = new(1)
end

test(a) = a

test(2)
> 2 # ok

test() # this would throw an error if the struct didn't exist
> test(1) # ok

test() = 3 # test() is redefined
test()
> 3 # ok   

```

The only possible confusion would be that test() would not throw an error in the first case.

[Previous page](https://discourse.julialang.org/t/intialize-types-and-define-operators-within-them/15435.md?page=1)
