[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What `case' have done you? [Was: Re: Replace trivial pcase occurrences i
From: |
Garreau\, Alexandre |
Subject: |
What `case' have done you? [Was: Re: Replace trivial pcase occurrences in the Emacs sources] |
Date: |
Tue, 30 Oct 2018 01:36:20 +0100 |
User-agent: |
Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian |
On 2018-10-29 at 22:46, Michael Heerdegen wrote:
> + (?y (setq skip t))
> + (?q (keyboard-quit))
> + (?N (setq skip 'no))))))
> + (:group (setq group (pop body)))
> + (:abbrev-table (setq abbrev (pop body)) (setq declare-abbrev nil))
> + (:syntax-table (setq syntax (pop body)) (setq declare-syntax nil))
> + ((or 'nil 'public :public) nil)
> + ((or 'protected :protected) 'protected)
> + ((or 'private :private) 'private)
There are quite some (long) cases where only matching characters or
symbols: is it really that problematic to use `case' (though, in such
common functions body, I wouldn’t find cond+assoc natural either)? I’m
uncomfortable to make elisp, like ocaml, the kind of language where if
you want the equivalent of a switch, etc. you’d need the pattern
matching facility. That’s excessive promotion of pattern matching I
find. And `case' wasn’t invented for no purpose: it already existed in
common lisp and many lisps, and would perfectly fit there, why
invisibilizing it so much, even for cases it works? Why is everybody
banning so much that hard `case' from elisp common usage?
- Re: pcase ` meaning, (continued)
- Re: pcase ` meaning [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Clément Pit-Claudel, 2018/10/29
- Re: pcase ` meaning, Garreau\, Alexandre, 2018/10/29
- Re: pcase ` meaning, Stefan Monnier, 2018/10/30
- Re: pcase ` meaning, Garreau\, Alexandre, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/28
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/29
- What `case' have done you? [Was: Re: Replace trivial pcase occurrences in the Emacs sources],
Garreau\, Alexandre <=
- Re: What `case' have done you? [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Michael Heerdegen, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/31