GNU bug report logs - #47368
28.0.50; map-elt returns nil without "deprecated" TESTFN

Previous Next

Package: emacs;

Reported by: dalanicolai <dalanicolai <at> gmail.com>

Date: Wed, 24 Mar 2021 22:54:02 UTC

Severity: normal

Tags: patch

Found in versions 28.0.50, 27.1

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 47368 <at> debbugs.gnu.org (full text, mbox):

From: dalanicolai <dalanicolai <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 "Basil L. Contovounesios" <contovob <at> tcd.ie>, 47368 <at> debbugs.gnu.org
Subject: Re: bug#47368: 28.0.50;
 map-elt returns nil without "deprecated" TESTFN
Date: Fri, 26 Mar 2021 16:32:39 +0100
[Message part 1 (text/plain, inline)]
Well, as a hobbyist programmer, this makes more sense to me anyway. If
users don't want the behavior of using `equal` then they could just as well
use `alist-get`.

I hope you don't mind if I write down some thoughts (and macro's) I have on
my mind.
Personally, I think it would be great for growing the community, if
emacs-lisp got more approachable (in the direction of python).
I actually got here because, as an exercise, I was trying to implement Norvig's
sudoku solver <https://norvig.com/sudoku.html> in emacs-lisp, which was a
quite frustrating exercise (this is no complaint, but just a fact).
I think it would be great if emacs-lisp could look, and become readable and
usable, more like that (in which map.el and seq.el are doing a very nice
job of course). So that emacs-lisp could actually
become a nice and friendly teaching language, which is equally fun to
script in as in python.

Actually, I got the feeling that it would be nice to have
list-comprehension like syntax also. Therefore, I tried to create some
general `array` and `table` macro's here
<https://github.com/dalanicolai/list-factory/blob/main/list-factory.el>
(which is my first macro exercise ever).
As it is just an exercise it is undocumented, but you can very easily get
the idea from looking at the (commented out) tests at the bottom of that
file. Also, from looking at map.el, I assume I should probably
implement it using cl-defgeneric.

Haha... sorry for the elaborate answer.  You can neglect most of this
message, but maybe someone is interested and shares some of these ideas (or
likes the idea of these macro's). I just couldn't resist to share these
thoughts...
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.