emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase-setq


From: Michael Heerdegen
Subject: Re: pcase-setq
Date: Tue, 13 Oct 2015 15:52:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> I'm not sure I understand: "an alternative to destructuring-bind"
> sounds like what pcase-let provides.

I was confused about `destructuring-bind', sorry.

> `pcase-setq' would be more like merging pcase and setf.

Yes, or at least `pcase' and `setq'.  Being able to set/bind generalized
variables is an orthogonal, but also interesting thing.

> I don't think it's easy, actually.  But yes, that would be a useful
> addition.

Being very naive and not yet understanding all of your code, I guess it
could be as easy as to modify/reuse the `pcase--expand' code and make
the return value that is now

    (macroexp-let* defs main)

discard main and turn the defs into a sequential `setq' form, and return
that.  Plus hashing via `pcase--memoize'.


Michael.



reply via email to

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