emacs-devel
[Top][All Lists]
Advanced

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

Re: Question on pcase


From: Michael Heerdegen
Subject: Re: Question on pcase
Date: Fri, 23 Oct 2015 16:14:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> > Possible - maybe.  Useful: IMHO no.  `pcase' is simple and easy to
> > learn.
>
> Evidently, at least one developer found it daunting.

I found it daunting too before I tried to learn it. 

> > It just looks a bit frightening and strange at first.  I would
> > rather improve documentation or write an easy intro than invite
> > people to avoid learning an excellent tool.
>
> How about doing both?  Maybe that will prompt people to learn about
> pcase rather than hate it and stay away of it?

Sure.  Let me think about what would make sense.  I think we should
first write some simple guide to understand pcase.  If anything more is
needed then, ok, let's see what this is.  For now, the "demystify" thing
is the best thing I can offer for someone who doesn't want to learn it.

The problem here is that the semantic of `pcase' is so many-sided.  You
can use it like `let'.  You can use it like `cond'.  You can use it like
`case'.  You can use it like `destructuring-bind'.  All combined, and
more.  So there obviously must be a quite a bit of stuff to learn and
remember about pcase, and you have to practise it a bit.


Michael.



reply via email to

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