emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : Re: cond* vs pcase


From: Stefan Monnier
Subject: Re: [External] : Re: cond* vs pcase
Date: Mon, 12 Feb 2024 16:39:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>>>>    (pcase foo
>>>>      ('bar (do-some-bar-stuff))
>>>>      ('baz (do-some-baz-fluff)))
>>>>
>>>> is not more awful or wonderful than:
>>>>
>>>>    (cl-case foo
>>>>      (bar (do-some-bar-stuff))
>>>>      (baz (do-some-baz-fluff)))
>
> Sorry to interject, but this really suggests that `cl-case' should
> become, simply, `case', in subr.el this time around...

No, on the contrary.  It just suggests that for this specific kind of
situations, either works about as well, so this is a use-case that would
not justify adding `pcase` if we already have `cl-case` (or `case`) and
it similarly would not justify adding `cl-case` (or `case`) if we
already have `pcase`.


        Stefan "who would have preferred to extend `(cl-)case` rather
                than introduce a new name, if it weren't for the fact
                that the `(cl-)case` syntax does not lend itself to such
                extensions"




reply via email to

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