emacs-devel
[Top][All Lists]
Advanced

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

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


From: Aaron Ecay
Subject: Re: The poor state of documentation of pcase like things.
Date: Sat, 26 Dec 2015 15:52:48 -0500
User-agent: Notmuch/0.21+26~g8881a61 (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-unknown-linux-gnu)

Hi Michael,

2015ko abenudak 26an, Michael Heerdegen-ek idatzi zuen:
> 
> Richard Stallman <address@hidden> writes:
> 
>> I am not convinced, but I won't argue about it.
> 
> I'm open to improvement suggestions, as long as they keep the thing
> consistent.
> 
> We could try to define a new pattern offering destructuring looking less
> "unusual" (though we already have `seq' provided by seq.el which has
> very simple semantics).  OTOH I think ` is already quite optimal for the
> set of features it offers.
> 
> For the _ pattern, I guess we could reinvent it's meaning in pcase in
> general.  But I don't see how the resulting semantics could be made
> equally simple as it is currently.
> 
> Just changing what _ does in pcase's ` to save a comma would IMHO be
> what we call in German "verschlimmbessern" (my dictionary says you can
> translate that into "disimprove").

Atoms (strings, numbers, and keywords) are simultaneously patterns and
qpatterns.  That is, one writes `(1 2) and not `(,1 ,2) to match a list
containing 1 and 2 (though actually either form works).  Why could _ not
also be shared between the pattern and qpattern classes?

(I guess part of the answer is aesthetics – but I’m pointing out that
the set of patterns and qpatterns is already non-disjoint.)

-- 
Aaron Ecay



reply via email to

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