[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Backquote constructs" to "splice" values without "eval".
From: |
Jambunathan K |
Subject: |
Re: "Backquote constructs" to "splice" values without "eval". |
Date: |
Tue, 08 Jan 2013 11:21:24 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
>> Consider example when 'some' func return region and 'another' require beg/end
>> pair:
>>
>> (defun some () ... (list beg end))
>> (defun another (x beg end y) ...)
>>
>> I think that this code ugly:
>>
>> (another x (car (some)) (cdr (some)) y)
>
> Talking about ugly, while architecting something on a small scale is
> sure way to get lost.
>
> Aesthetics is over-rated.
>
> ps: This is not a criticism of what you are doing but an observation
> from my own experience.
>
>> If 'some' is complicated you need:
>>
>> (let* ( (region some) (beg (car region)) (end (cdr region)) )
>> (another x beg end y)
>> )
>
> destructuring-bind, pcase, pcase*
^^^^^^
It should be pcase-let, pcase-let*.
Message not available