> The code for \setcounter{counter}{number} is
>
>   value set_counter ps = do
>   {
>     let ctr = read_expanded_argument ps in
>     let arg = Parser.str_to_int (read_expanded_argument ps) in
>
>     ParseState.set_counter ps ctr arg
>   };
>
> It would be much neater to write something like:
>
>   command \setcounter (ctr : expanded) (arg : int) =
>   {
>     ParseState.set_counter ps ctr arg
>   };

Please do not underestimate the abstractional power of a functional
programming language such as OCaml. Your first example can
probably be polished a bit, even within the language.

If one imagines how crude the facilities that TeX itself offers
are, and what LaTeX or ConTeXt have made of it over the years,
then I am convinced being offered an interface within OCaml would
bring up styles beyond our imagination!

One of the main advantages of _not_ using a preprocessor or
macro system of any sort is that one would finally get usable
error messages from the system. I would not give that up too
easily.

Ant certainly looks very interesting. Keep up the good work!

Best,
  Andres

--

Andres Loeh, Universiteit Utrecht

mailto:[log in to unmask]     mailto:[log in to unmask]
http://www.andres-loeh.de