# \[SOLVED\] Difference between where {T} and where T and infix operators

**URL:** https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966
**Category:** New to Julia
**Created:** [March 17, 2019, 3:40pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966 "2019-03-17T15:40:26Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![maestox](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@maestox](https://discourse.julialang.org/u/maestox)
#### Post date: [March 17, 2019, 3:40pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/1 "2019-03-17T15:40:26Z")

</div>

Hello !  
[english is not my native language. So if you don’t understand, tell me, I’ll try to say otherwise]  
First, thanks to all Julia’s developpers. I discovered this language yesterday, and I find it really nice !

Second, I’m reading the doc, and have beginner questions,

- Is there a difference between `same_type(x::T,y::T) where T = true` and `same_type(x::T,y::T) where {T} = true` ? I tried both and it seems to me that they work same.
- Does there exist in Julia user-defined infix operators ?

Thanks ! 🙂

---

<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: [March 17, 2019, 3:45pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/2 "2019-03-17T15:45:04Z")

</div>

Welcome!

With just one type var, the two are identical. The curly braces are a convenient shorthand when you have more than one variable — it’s just `where {T,S}` instead of `where S where T`.

It also makes it a bit easier for me to read `where {T} = ...` since otherwise my brain wants to make it seem like you’re assigning the function body to just `T`.

(Also your English is great)

---

<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: [March 17, 2019, 3:49pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/3 "2019-03-17T15:49:23Z")

</div>

Oh and as to your second question, there’s a limited number of names that can be used as infix operators, but all of them can be used for your own purposes. See [Mathematical Operations and Elementary Functions · The Julia Language](https://docs.julialang.org/en/v1/manual/mathematical-operations/#Operator-Precedence-and-Associativity-1) (and the link to parser.scm) for the list and precedences.

---

<div class="post-metadata">

### Author: ![maestox](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@maestox](https://discourse.julialang.org/u/maestox)
#### Post date: [March 17, 2019, 4:59pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/4 "2019-03-17T16:59:12Z")

</div>

Thanks for your quick replies !

So, its not possible to have user-defined infix operator symbol ? ☹ Hm, this programming language can’t be perfect-like 🙂

If I have other questions, at a moment, should I open another topic ? Or write them down here ?

---

<div class="post-metadata">

### Author: ![improbable22](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/improbable22/32/5464_2.png) [@improbable22](https://discourse.julialang.org/u/improbable22)
#### Post date: [March 17, 2019, 5:03pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/5 "2019-03-17T17:03:54Z")

</div>

> [@maestox](#):
>
> its not possible to have user-defined infix operator symbol ?

You can’t invent your own symbols entirely, but you can choose from a long list of existing unicode symbols — check the `parser.scm` link. Most of these have no existing operator meaning.

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [March 17, 2019, 5:52pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/6 "2019-03-17T17:52:12Z")

</div>

> [@maestox](#):
>
> If I have other questions, at a moment, should I open another topic ? Or write them down here ?

It’s better to open a new topic for a new question. That helps keep the conversations clearer and easier to read for future users.

---

<div class="post-metadata">

### Author: ![maestox](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@maestox](https://discourse.julialang.org/u/maestox)
#### Post date: [March 19, 2019, 12:04pm UTC](https://discourse.julialang.org/t/solved-difference-between-where-t-and-where-t-and-infix-operators/21966/7 "2019-03-19T12:04:17Z")

</div>

oh ! I havn’t seen the link to parser.csm (sorry mbauman). thanks 🙂

And, ok rdeits, i’ll do so !

Thanks for your replies to you !
