Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.lisp Subject: Re: when are macros useful? Date: Sat, 6 Jul 2024 07:42:53 -0000 (UTC) Organization: A noiseless patient Spider Lines: 24 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 06 Jul 2024 09:42:53 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1bf6ca10d24952d079c382420ceea130"; logging-data="3921908"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eX8Upvkpqd1jucH7aV32q" User-Agent: Pan/0.158 (Avdiivka; ) Cancel-Lock: sha1:hNfimXN2kqXOlV70bfZHg2h7NYc= Bytes: 1614 On Thu, 4 Jul 2024 22:04:48 -0000 (UTC), B. Pym wrote: > (define-syntax ntimes > (syntax-rules () > [(_ count forms ...) > (do ((n 0 (+ n 1))) > ((= n count)) > forms ...)])) I think it’s a sign of desperation when you hope that using different kinds of bracketing symbols will somehow make your code clearer. The screen/page is two-dimensional; why not make use of both dimensions in laying out your code? (define-syntax ntimes (syntax-rules () ((_ count forms ...) (do ((n 0 (+ n 1))) ((= n count)) forms ... ) ; do ) ) ; syntax-rules ) ; define