# Why distinguish macro names with @?

**URL:** <https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001>\
**Category:** Internals & Design\
**Created:** [May 13, 2022, 8:57am UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001 "2022-05-13T08:57:33Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [May 13, 2022, 5:19pm UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/41 "2022-05-13T17:19:09Z")

</div>

This is not playing devil’s advocate (which is often considered a rude thing to do unless asked to), this is being dismissive of anything that do not fit your specific use case or “fells wrong” to you.

1. I care, and a lot of people seem to think the same.
2. What there is to not understand about name conflict? Some packages provide a function to do something and a macro version of the same name for a more convenient syntax.
3. Parenless syntax is just nice aesthetically to some people, the same way `@` is bad aesthetically for you.
4. Not everyone uses vt220 or Emacs. Again, incredibly, the language was not tailored for your very specific workflow.
5. It is in the interest of most Julia users to increase the number of situations in which packages and code in general can be fully precompiled.

---

<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:** [May 13, 2022, 5:36pm UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/42 "2022-05-13T17:36:48Z")

</div>

@barfo you’re being unnecessarily aggressive in this thread. Surface syntax will always be an aesthetic judgement sort of thing. You’ve asked why and have received a number of reasons, both personal preferences and authoritative sources. You may disagree — and that’s ok! — but your disagreement does not mean that those rationales are invalid.

At this point, you’re entering into the [knee-jerk contradiction](https://discourse.julialang.org/faq#agreeable) level of discourse we seek to avoid here. It’s neither productive nor edifying, and it generally just descends into unnecessary flame wars. There are many other places on the internet where you can be argumentative for argumentativeness sake.

---

<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:** [May 13, 2022, 5:43pm UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/43 "2022-05-13T17:43:02Z")

</div>

> [@barfo](#):
>
> No idea who @jeff.bezanson is… remember I’m the devil…
> 
> - who cares
> - huh?
> - don’t know why you want this anyway
> - only green on my vt220
> - emacs can figure it out anyway
> - makes no sense at all… if it’s precompiled it’s precompiled, get over it if it goes wrong.
> 
> some who knows how, kill off this thread. It’s pointless noise now.  
> barfo.

This is one of the laziest argument techniques out there, and it can be applied to literally anything anyone argues.

“Here is why I think cars should have seatbelts”  
“lol, who cares”

You’re not playing devil’s advocate, you’re just being obnoxious. You’re not obligated to care about the things we care about in language design, but similarly we are not obligated to find your trolling here compelling, interesting, or persuasive.

---

<div class="post-metadata">

**Author:** ![suavesito](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/suavesito/32/34386_2.png) [@suavesito](https://discourse.julialang.org/u/suavesito)\
**Post date:** [May 13, 2022, 7:12pm UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/44 "2022-05-13T19:12:29Z")

</div>

> [@barfo](#):
>
> Types behave differently from variables

This is not completely true in Julia. Types themselves are just variables of type `DataType`. That is why is possible to pass them to functions.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [May 13, 2022, 10:15pm UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/45 "2022-05-13T22:15:12Z")

</div>

This is not entirely true, as `DataTypes` are kinda of treated specially. By allowing them in function signature, for example. However, you are correct that you can just do a `const T = MyType` and basically start using it anywhere you would use the type name.

---

<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:** [May 13, 2022, 11:31pm UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/46 "2022-05-13T23:31:03Z")

</div>

@Henrique_Becker, I think that’s @suavesito’s entire point. Types do not hold any special syntactic or semantic meaning in Julia that’s distinguishable from values because they **are** values. This is in stark contrast to most statically typed languages. Just because some things require values whose type is `DataType` doesn’t contradict this, just like how me writing

```julia
f(x::Int) = x + 1

```

doesn’t make `Int` special.

And no, you don’t need to even write `const T = MyType`, you can just write `T = MyType` (though this will be a dynamic binding and thus slow).

---

<div class="post-metadata">

**Author:** ![barfo](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@barfo](https://discourse.julialang.org/u/barfo)\
**Post date:** [May 14, 2022, 3:19am UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/47 "2022-05-14T03:19:04Z")

</div>

I think this has digressed well beyond my intent and I didn’t help in that… oops.

Please don’t mistake terse for aggressive, put a smiley on the end of everything I say 'cause that’s what’s on my face.

My initial question, the motivation for the @, has been answered here. At least in the context of the function like macro syntax, it was purely _stylistic_ choice. Nothing more devious than that at play.  
barfo.

---

<div class="post-metadata">

**Author:** ![suavesito](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/suavesito/32/34386_2.png) [@suavesito](https://discourse.julialang.org/u/suavesito)\
**Post date:** [May 14, 2022, 5:43am UTC](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001/48 "2022-05-14T05:43:08Z")

</div>

> [@barfo](#):
>
> don’t mistake terse for aggressive

While I don’t doubt that you were not trying to be aggressive, being too “terse” doesn’t allow a sentence to explain itself enough for it to not be confused for aggression. I invite you to, maybe in the next debate, be more expressive with your arguments.

I would also say that the same arguments to bring your point onboard could have been developed without playing “devil’s advocate”. As @Henrique_Becker said, it might be considered rude.

> [@barfo](#):
>
> it was purely _stylistic_ choice

It might be “just” a stylistic choice, but I would argue (and I think a lot of other people too) that it is a _very useful_ stylistic choice, for many reasons outlined in this thread. 🙂

[Previous page](https://discourse.julialang.org/t/why-distinguish-macro-names-with/81001.md?page=2)
