That's quite often used in TeX/LaTeX, in fact. shorvrb, fancyvrb, listings packages use | for short verbatim text, for example. Knuth himself also use | for short verbatim in TeXbook, and use " and | for index items and labels in Concrete Math. Of course you can define your own short commands.
First of all, you should keep in mind that where they fail. In (La)TeX, only very few characters are rarely used for normal text typesetting, and then can be used for short commands. The most common two commands are | and ". They both have no use in normal text, and | can be used as \vert in math mode. Be careful that | is used in tabular column specifiers for vertical lines, and " denotes the hexadecimal numbers in TeX. And babel also redefines the meaning of " for some languages. What's more, in verbatim and \verb, the changed characters may also be problematic. Is that all? No! the characater | also has special meaning in argument of \index. I'm not sure these are all cases, you may meet more.
What's more, you should have ablility to disable the short commands by restore the catcodes. For example, shortvrb provides \DeleteShortVerb, you can disables the short verbatim easily.
And the third thing is that you must be careful about the conflictions between different packages and your own code. Since you can use shortvrb to change the meaning of |, you cannot use | for \emph at the same time. If the code is not carefully wrote, there might be more problems.
You can read the documented source code of shortvrb to know how to safely define such a short command, and think over the problems you may meet.
Some of the problems can be avoided by carefully coding. For example, directly define a short command like this:
\documentclass{article}
\begin{document}
\catcode`|=\active
\def|#1|{\emph{#1}}
\begin{verbatim}
a|b|c|d
\end{verbatim}
\end{document}
you will get a ! File ended while scanning use of |. error. How to solve it? shortvrb package uses a \add@special to add the character to \dospecials list, then the verbatim will work well:
\def\add@special#1{%
\rem@special{#1}%
\expandafter\gdef\expandafter\dospecials\expandafter
{\dospecials \do #1}%
\expandafter\gdef\expandafter\@sanitize\expandafter
{\@sanitize \@makeother #1}}
\def\rem@special#1{%
\def\do##1{%
\ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}%
\xdef\dospecials{\dospecials}%
\begingroup
\def\@makeother##1{%
\ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
\xdef\@sanitize{\@sanitize}%
\endgroup}
It's rather complex, indeed. You can use \add@special for your own code when needed. The code can be simpler if you just redefine one particular character like | or ". Herbert has shown another example to make sure that | work well in tabular environments, and don't forget patching array environment!
If you meet strage things, just use a command like \DeleteShortVerb. The simplest implement is to change the catcode back to 12. However, it is also difficult to define a safe \DeleteShortVerb to restore the original meaning of the character.
To prevent possible problems in other packages, you should change the catcodes as late as possible. You can use \AtBeginDocument to ensure that the catcodes are changed after preamble.
tabularenvironment is used in the argument of another command; this is the usual problem with category code changes. – egreg Jan 09 '12 at 15:49