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, 30 Oct 2015 02:11:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Oleh Krehel <address@hidden> writes:

> I think that we should at least encourage `pcase' to macroexpand to a
> simple `cond' with a regular structure every time.

If you mean to expand a single branch into a `cond' with a regular
structure: The semantics of `pcase' is too complex for that.  In
general, you have a decision _tree_, because patterns can depend on each
other, hence you can't expand to a `cond' form in the general case.
Instead, you have a tree of nested `if's, combined with let bindings
(that are used to construct the environment of bindings created by the
pattern parts matched "so far").


Michael.




reply via email to

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