[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch (Re: [Texmacs-dev] Once again: automatic quoting)

From: Henri Lesourd
Subject: Re: Patch (Re: [Texmacs-dev] Once again: automatic quoting)
Date: Sat, 15 Oct 2005 21:37:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02

On Sat, Oct 15, 2005 at 06:27:42PM +0200, Henri Lesourd wrote:
for example more macros for usual programming
constructs like (foreach), (while), etc.

Macros like these are *already* included. See kernel/boot/abbrevs.scm.

There is a nice (for) macro, but the
usual Basic's "For I=1 To N" is missing.

Notice that while and for-each are language primitives.

I didn't know that the (while) exists in Scheme,
it's not in R5RS (but, true, it exists in Guile).

And as far as for-each is concerned, it
is as unintuitive as possible. The syntax
of (for-each) is :
  (for-each <lambda> list1 list2 ... listn)

So to understand such a basic looping construct,
you need :

(1) To know what is a lambda function ;

(2) To understand in the first place that, in
   fact, the (for-each) syntax stems from the
   one of (map) ;

In practice, this is extremely dissuasive for
the potential contributor that is only experienced
in usual programming languages : the guy needs
two absolutely non self-evident concepts, just
to start writing a simple loop !

Those things are stupid things, but the fact
remains that there are lots of things like
this in Scheme.

Best, Henri

reply via email to

[Prev in Thread] Current Thread [Next in Thread]