[Top][All Lists]

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

Re: The poor state of documentation of pcase like things.

From: Michael Heerdegen
Subject: Re: The poor state of documentation of pcase like things.
Date: Sun, 03 Jan 2016 01:19:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Some of the quoted pcase examples indeed felt like the "if your
> preferred tool is a hammer, every problem looks like a nail"
> phenomenon.

Ironically, the same applies to Emacs itself  ;-)

> There certainly is a case for liberal use of complex complexity-taming
> constructs (for example, overall I can appreciate how cl-loop
> straightens out a lot of awkward loop constructs even though its syntax
> is not really Elisp-like).  But when a simple construct is a perfect
> fit, it's not helping understanding.

I don't see how a pcase used like a cl-case - as in the quoted example -
is any harder to read or understand.

And of course it has also advantages to use pcase in such cases.  If you
want to change the code or try things and you suddenly want a feature
from pcase, you don't have to rewrite the whole thing.

It just...arguable what you prefer.  What I find a bit irritating is
this seemingly upcoming kind of agreement "Please, let's all avoid this
thing, ok? - it's frightening!" I read between the lines.  Sorry if my
impression is wrong.


reply via email to

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