[texhax] defin'd?
Reinhard Kotucha
reinhard.kotucha at web.de
Wed Dec 23 19:57:56 CET 2015
On 2015-12-23 at 13:30:15 +0000, Joseph Wright wrote:
> On 23/12/2015 13:17, Uwe Lueck wrote:
> > Discussing with Reinhard Kotucha, Philip Taylor argued
> >
> >> P.S. I think the following demonstrates why \@undefined is
> >> markedly inferior to \ifcsname :
> > [etc.]
> >
> > probably meaning inferiority of \LaTeX's \@ifundefined to the
> > \varepsilon-\TeX primitive \ifcsname, in that \@ifundefined
> > uses \csname and thus may assign a meaning to a named token
> > that before didn't have a meaning, or simply may increase the
> > hash table without increasing functionality. Both the two of
> > them (the German comedian equivalent may be "die zwei beiden")
> > also referred to a similar discussion on the list many years
> > ago (Phil provided the URL).
> >
> > I would like to remind readers of a third approach that uses
> > \csname and though does not increase the hash table
> > (permanently -- made in Germany): Bernd Raichle's german.sty
> > has (had)
> >
> > \begingroup\expandafter\expandafter\expandafter\endgroup
> > \expandafter\ifx\csname ProvidesPackage\endcsname\relax
> >
> > So definedness of \ProvidesPackage as \ifx-equivalent to
> > \relax is restricted to a local group, outside true
> > undefinedness is not affected.
> >
> > There could be a variant \@IfUndefined of \@ifundefined with
> > an only local side effect as follows:
> >
> > \def\@IfUndefined#1{%
> > \begingroup\expandafter\expandafter\expandafter\endgroup
> > \expandafter\ifx\csname #1\endcsname\relax
> > \expandafter\@firstoftwo
> > \else \expandafter\@secondoftwo \fi}
>
> Noting that this is not expandable, in contrast to LaTeX's \@ifundefined
> and \ifcsname. (The latter is clearly the best approach when allowed.)
... and the macro above doesn't prevent anything from going into the
hash table.
Regards,
Reinhard
> > P.S.: I have ignored \varepsilon-\TeX\ until very recently ...
> > sympathizing with minimalistic implementations of \TeX. On
> > the other hand, I don't agree much when I read that the NTS
> > project "failed" -- \varepsilon-\TeX\ has been a useful result.
>
> Given that other than "tex", all widely-used binaries in use nowadays
> feature the extensions, I think e-TeX is clearly a success. Whether it
> achieved everything desirable is a different matter, of course.
>
> Joseph
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the texhax
mailing list