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



_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to