LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Hans Aberg <[log in to unmask]>
Date:
Tue, 7 Dec 1999 23:56:14 +0100
In-Reply-To:
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (52 lines)
At 23:02 +0100 1999/12/07, Marcin Wolinski wrote:
>> I think I pointed that the dynamic aspect does not appear to make sense in
>> TeX. Therefore I concentrated on the static, namespace, aspect, which just
>> as templates just requires macro expansions.
>
>The problem is you cannot fully implement static namespaces in TeX ---
>not for all primitive datatypes present.

With much of the development of computer languages, there is the idea that
the user should be forced to program in certain ways.

TeX does not have such a mechanism that could put restraints of usage in
say LaTeX. It would be great if TeX had such a capacity, but there is no
point in taking up that aspect with TeX as it now is.

>So the seemingly obvious similarity to objects is in fact rather
>misleading.

I should said that what I called an ``object'' in my TeX description is not
say a C++ class or anything similar.

Another comment though is that even though that the final TeX output is a
static DVI page, the processes at arriving there are fairly dynamic:

One can after all use \def to define a new operator. The difference between say
   \newenvironment
and
   \new{environment}
is that the latter can be used ``dynamically'' with a parameter
   \new #1
The fact that the use of \csname..\endcsname makes this slow is then just a
variation of a general fact that programming with dynamic structures is
slow.

One can even do something that is similar to polymorphism in TeX by the use
of the \let operator: \let\a\b ``mutates'' the \a macro into the value of
the \b macro.

I just mention this as an input of ideas: If one has the ideas of OOP in
ones mind, then one might make use of this in LaTeX somehow.

I think that LaTeX will require OOP at least in the form of localization of
macro names into different namespaces, due to the fact that LaTeX has grown
so wast, and this will be needed in order to avoid name clashes, and so
that one program against interfaces without really having to know about the
interior of the objects one is manipulating.

  Hans Aberg
                  * Email: Hans Aberg <mailto:[log in to unmask]>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>

ATOM RSS1 RSS2