# Length needs backslash but counter does not, why?

\documentclass{minimal}
\parindent=0sp

\newlength{\Length}
\setlength{\Length}{1in}

\newcounter{Count}
\setcounter{Count}{10}

\begin{document}
\the\Length

\theCount
\end{document}


Length needs backslash but counter does not, why?

-

Counter names are used for many purposes and it's safer to just append the name to the or c@ or p@ and to use it as the argument of \arabic, \Roman and so on. When you say \newcounter{Count}, LaTeX does, among other things

\expandafter\newcount\csname c@Count\endcsname
\@namedef{theCount}{\arabic{Count}}


Moreover this makes more complicated to do local assignments to counters, that should never be done, because LaTeX counters should always be modified globally; for local counters there are the "TeX" counters that can be defined by \newcount; in general, however, \count@, \@tempcnta and \@tempcntb provided to this purpose by the LaTeX kernel suffice. See this discussion on TeX.sx to know more about doing local and global assignments to the same variable, which shows that my statement before is quite drastic, but one should know what they are doing when "violating" rules.

For lengths this is not needed and one can even use TeX syntax

\Length=3cm


(assuming all the connected risks). Moreover, and probably more important, \setlength and \addtolength are easier to define and use.

-
while all that martin says is true, there's a bit of "because it is" in the answer to this question, imo. if lamport had chosen to treat skips the same as counts, no-one (surely) would have minded -- excepting, of course, those who despise latex's principles, root and branch. –  wasteofspace Jul 17 '11 at 14:23