[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
João Távora |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Wed, 24 Oct 2018 11:16:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
Richard Stallman <address@hidden> writes:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > In what sense is the above cl-case more clear than the pcase equivalent?
> > I'm not saying the pcase version is better in those cases, but I think
> > the respective advantages and disadvantages pretty much balance out.
>
> I also wonder. Is it simply that people find pcase unfamiliar?
My two cents: I like to write it, I don't like to read it.
I like to write it because it's fun. I write some dummy '(1 2 (3 4 5) 6
7) into my code and then semi-randomly hammer out parenthesis,
backquotes, commas and underscores until it does what I want. In the
end I'm happy for winning this little game, and happily convinced it
saved me a ton of LOC (which it probably did). When reading it, I
shudder a little. The backquote syntax helps in warning that something
potentially difficult is in front of me, so please don't remove it.
I can't explain, but I don't feel this way about destructuring-bind (or
its destructuring-case variants [0]): they're boring to write and easy
to read.
João
[0]:
http://www.crategus.com/books/alexandria/pages/alexandria.0.dev_fun_destructuring-case.html
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Richard Stallman, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Joost Kremers, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Daniel Pittman, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- pcase pattern syntax (was: Replace trivial pcase occurrences in the Emacs sources), Stefan Monnier, 2018/10/24
- Re: pcase pattern syntax (was: Replace trivial pcase occurrences in the Emacs sources), Joost Kremers, 2018/10/26
- Re: Replace trivial pcase occurrences in the Emacs sources,
João Távora <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Richard Stallman, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources, Andy Moreton, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/26
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/26
- Re: Replace trivial pcase occurrences in the Emacs sources, Andy Moreton, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/28
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/29