Re: Slow Loop (alternatives in lisp?)

Liste des GroupesRevenir à cl lisp 
Sujet : Re: Slow Loop (alternatives in lisp?)
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.lisp
Date : 23. Jul 2024, 03:24:37
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240722182106.323@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-07-22, B. Pym <Nobody447095@here-nor-there.org> wrote:
* there is already a WHILE in Common Lisp. No need to invent a new one:
 
(loop while (foo-p) do .... )
>
Gauche Scheme
>
(while (read) (print "True enough."))
2
True enough.
#t
True enough.
'yes
True enough.
#f
>
(while (read) => x (print x " is truer than you think."))
[ ... ]
Paul Graham:
>
I consider Loop one of the worst flaws in CL, and an example
to be borne in mind by both macro writers and language designers.

But the above => cruft is exactly like LOOP clause syntax.

It might as well be

 (while (read) with x do (print ...))

More Lispy way:

  (whilet ((x (read)))
    ...)

Date Sujet#  Auteur
22 Jul 24 * Re: Slow Loop (alternatives in lisp?)3B. Pym
23 Jul 24 +- Re: Slow Loop (alternatives in lisp?)1Kaz Kylheku
10 Aug 24 `- Re: Slow Loop (alternatives in lisp?)1steve g

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal