[alexandria-devel] [PATCH] Added Scheme's LET as LET@

Nikodemus Siivola nikodemus at random-state.net
Sun Jan 27 15:17:06 UTC 2013


On Sunday, January 27, 2013, Pierre Thierry wrote:

> Scribit Nikodemus Siivola dies 26/01/2013 hora 16:21:
> > I'm OK with a named-let in principle, I think. Maybe. But I'm
> > dead-set against calling it let at .
>
> The thing is, if you want to code with a scheme style, you'll use
> named lets very often, so it ought to have a rather short name. Why


Here's the thing: I think if you want to code Scheme style you should use
Scheme - or at least a library that tries to integrate schemey idioms into
CL. I do not believe Alexandria should try to incorporate scheme idioms -
not because they're bad, but because they're not CL idioms.

I find named-let mostly useful for quick initial ports of code written in
Scheme.


> the issue with let@, for my curiosity's sake? (for me, @ looks a lot
> like a spiral or something like an ongoing loop)


I don't really care if people think it a matter of taste or objective
truth. The fact remains that I'm opposed to single-character suffixes or
prefixes denoting variants of standard operators in general purpose
libraries. (I'm much more lenient about special purpose libs.)


> > (Most of the time when I see code written with named let I want to
> > rewrite it into something more readable, but I'm willing to believe
> > that it doesn't have to be always bad...)
>
> Ever since I understood recursion, I've always found this way more
> readable than anything else, to what would you usually rewrite a named
> let?


Depends. Labels, do, dolist, do*, loop, tagbody, mutually recursive
toplevel defuns, dotimes, prog, y-combinator. Whatever seems most
appropriate for the task at hand.


>
> Curiously,
> Pierre
> --
> pierre at nothos.net <javascript:;>
> OpenPGP 0xD9D50D8A
>


-- 
Cheers,

 -- Nikodemus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/alexandria-devel/attachments/20130127/5d16363b/attachment.html>


More information about the alexandria-devel mailing list