Received: from mail.proteosys.com ([62.225.9.49]) by nummer-3.proteosys with Microsoft SMTPSVC(5.0.2195.5329); Wed, 9 Jul 2003 20:23:14 +0200 Received: by mail.proteosys.com (8.12.9/8.12.2) with ESMTP id h69IN9PP021588 for ; Wed, 9 Jul 2003 20:23:10 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.27]) by relay.uni-heidelberg.de (8.12.9/8.12.9) with ESMTP id h69I6qmp014053; Wed, 9 Jul 2003 20:06:52 +0200 (MET DST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C34647.28F0D500" Received: from listserv (listserv.uni-heidelberg.de [129.206.100.27]) by listserv.uni-heidelberg.de (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h68M02rJ007911; Wed, 9 Jul 2003 20:06:44 +0200 Received: from LISTSERV.UNI-HEIDELBERG.DE by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8d) with spool id 1862 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 9 Jul 2003 20:06:43 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h69HugM9020073 for ; Wed, 9 Jul 2003 19:56:42 +0200 Received: from mail.cs.uu.nl (aurora.cs.uu.nl [131.211.80.20]) by relay2.uni-heidelberg.de (8.12.9/8.12.9) with ESMTP id h69HujGl002910 for ; Wed, 9 Jul 2003 19:56:45 +0200 (MET DST) Received: from modena.cs.uu.nl (modena.cs.uu.nl [131.211.80.35]) by mail.cs.uu.nl (Postfix) with SMTP id EAAF31CB3D0 for ; Wed, 9 Jul 2003 19:54:52 +0200 (CEST) Received: by modena.cs.uu.nl (sSMTP sendmail emulation); Wed, 9 Jul 2003 19:54:52 +0200 In-Reply-To: <20030709121008.A11602@diabolo.informatik.rwth-aachen.de> References: <3F075002.72955C93@MartinHensel.de> <3F09CB24.7195F5E7@MartinHensel.de> <16138.9008.870309.967543@zarniwoop.ms25.local> <200307081028.19280.tim@birdsnest.maths.tcd.ie> <16139.118.62805.453383@puma.npc.de> <20030709121008.A11602@diabolo.informatik.rwth-aachen.de> Return-Path: X-OriginalArrivalTime: 09 Jul 2003 18:23:14.0950 (UTC) FILETIME=[2981CA60:01C34647] User-Agent: Mutt/1.4i X-Scanned-By: MIMEDefang 2.28 (www . roaringpenguin . com / mimedefang) X-Spam-Score: -26.2 () IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT Content-class: urn:content-classes:message Subject: Re: Invitation for discussion: My suggestion for a LaTeX3 syntax Date: Wed, 9 Jul 2003 18:54:52 +0100 Message-ID: A<20030709175452.GC7170@cs.uu.nl> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: Invitation for discussion: My suggestion for a LaTeX3 syntax Thread-Index: AcNGRymbjveHC9QORc27pV/w07Tspw== From: "Andres Loeh" To: Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 4669 This is a multi-part message in MIME format. ------_=_NextPart_001_01C34647.28F0D500 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > The code for \setcounter{counter}{number} is > > value set_counter ps =3D do > { > let ctr =3D read_expanded_argument ps in > let arg =3D 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) =3D > { > 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:andres@cs.uu.nl mailto:mail@andres-loeh.de http://www.andres-loeh.de ------_=_NextPart_001_01C34647.28F0D500 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: Invitation for discussion: My suggestion for a LaTeX3 = syntax

> The code for \setcounter{counter}{number} = is
>
>   value set_counter ps =3D do
>   {
>     let ctr =3D = read_expanded_argument ps in
>     let arg =3D = 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) =3D
>   {
>     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:andres@cs.uu.nl  &nb= sp;  mailto:mail@andres-loeh.de=
http://www.andres-loeh.de

------_=_NextPart_001_01C34647.28F0D500--