# Why prefer the letter @ in command names? [duplicate]

I am editing a class-file (extension `.cls`) created by several authors to format a thesis according to my university standards.

In that file, there are many command (re)definitions. For example, the following:

``````\let\@ldquote=\quote
\let\@ldendquote=\endquote
\renewenvironment{quote}
{\@ldquote\setlength{\baselineskip}{\z@}}
{\@ldendquote}
``````

ensures single-spacing in quotes regardless of text-spacing elsewhere in the chapters (usually double-spaced for corrections). There are many other similar examples.

In that example, as far as I can tell, the letter `@` is used instead of `o` without obvious reason, ie `\@ldquote` instead of `\oldquote`. It is also used in the macros `\z@, \@ne and \tw@`, to define "constants" for zero, one and two respectively.

I would personally qualify such practice as deliberate obfuscation, but it is not the first time I see this in class-files. Is there a point to this usage that I missed, or is this just the LaTeX-way of doing things?

• it's not silly but it is the latex (and plain tex) way – David Carlisle Jul 19 '17 at 14:55
• – David Carlisle Jul 19 '17 at 14:57
• They avoid that users change the commands in their documents and break everything. Check some expl3 package for another system. – Ulrike Fischer Jul 19 '17 at 14:57
• @UlrikeFischer Is that not achieved by using `newcommand` instead of `def`? – Jonathan H Jul 19 '17 at 15:01

The `@` sign in command names is meant for internal commands that should be protected from being used accidentally by the end user of a macro package or class file. So it is a distinction between "private" commands used by the macro package internally and "public" commands that are part of the user interface.
Note that the commands are not private and public as in higher programming languages; `\makeatletter` makes all internal commands of any macro package loaded available.