Why distinguish macro names with @?

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 specific 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.

@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 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.


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.


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.


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.


@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

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).


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.

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.

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. :slight_smile: