Deutsch English Français Italiano |
<20240722182106.323@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.lisp Subject: Re: Slow Loop (alternatives in lisp?) Date: Tue, 23 Jul 2024 01:24:37 -0000 (UTC) Organization: A noiseless patient Spider Lines: 33 Message-ID: <20240722182106.323@kylheku.com> References: <v7m8d9$p1e4$1@dont-email.me> Injection-Date: Tue, 23 Jul 2024 03:24:37 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2e723cea1cdfb5e1d326eb8834436c3e"; logging-data="950529"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5mqGKzRLyuG5g5vw23DXH/lrOrTolJ7I=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:jeFOci+X1/nfmsDcVID9UfIj6ZE= Bytes: 1563 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))) ...)