|
| From: | Dmitry Gutov |
| Subject: | Re: What's missing in ELisp that makes people want to use cl-lib? |
| Date: | Fri, 10 Nov 2023 23:17:32 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 10/11/2023 05:17, Po Lu wrote:
Hmmm, a bit vague, no? Humor me: if it's really so easy and so readable please write out your preferred equivalent of, say (cl-set-difference l1 l2) ; hopefully obvious, like l1 - l2 in python(let ((list nil)) (dolist (x l1) (unless (member x l2) (push x list))) (dolist (x l2) (unless (member x l1) (push x list))) list)
Just to take this example, there are about 2 major bugs: 1) the list will come out reversed, 2) the code does XOR rather than subtraction.
To be clear, this is not to take a dig at your coding ability (which I'm convinced is quite high), but rather to make a point about the potential for problems when one uses lower-level tools and has to reinvent the wheel.
| [Prev in Thread] | Current Thread | [Next in Thread] |