help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Org to Markdown programmatically


From: Emanuel Berg
Subject: Re: Org to Markdown programmatically
Date: Wed, 05 May 2021 22:58:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis wrote:

> Same with `while':
>
> (let ((list '((1 2) (3 4) (5 6))))
>   (while list
>     (let* ((pair (pop list))
>          (x (car pair))
>          (y (cadr pair)))
>       (message "%d + %d = %d" x y (+ x y)))))

Yes, it has the same issue I describe.

> Or with `mapc':
>
> (mapc (lambda (pair)
>       (let ((x (car pair))
>             (y (cadr pair)))
>         (message "%d + %d = %d" x y (+ x y))))
>       '((1 2) (3 4) (5 6)))

Same.

> And then benchmark

Well, not an issue here. We don't ever want to write ugly,
error-prone code with the argument it'll run faster.
Which often it doesn't, either. Instead and more importantly
debug, devel, maintain and extend time, _our_ time, will grow
exponentially with every poorly written module we add.

> `while' is giving me more clarity.

When you grow custom to other, better methods they are
actually much clearer to you, and everyone else.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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