emacs-devel
[Top][All Lists]
Advanced

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

Re: cond* vs pcase


From: Alfred M. Szmidt
Subject: Re: cond* vs pcase
Date: Mon, 05 Feb 2024 11:06:28 -0500

   I use pcase often; but I use it just as a better cond. For example I find 
this
   handy:

   (defvar foo nil) <-- foo is some symbol

   (pcase foo
     ('bar (do-some-bar-stuff))
     ('baz (do-some-baz-fluff)))

cl-case seems more appropriate here (wish cl-case was just case ...)

   or this:

   (setq foo "some-string")

   (pcase foo
     ("foo" (do-foo-case))
     ("bar" (do-bar-case)))

Same here, with (intern foo) ...



reply via email to

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