[Top][All Lists]

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

Re: [PATCH] Clojure-like syntactic sugar for an anonymous function liter

From: Stefan Monnier
Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal
Date: Thu, 22 Jan 2015 18:28:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Or at least the 3rd party control flow structures should
> not propagate.

I actually disagree here.  I think it's perfectly fine to define new
control structures, either in 3rd party libraries or locally for use in
your own file.  It's one of the main strengths of Lisp.

> Am I right in the assumption that only current #(...) syntax is that
> of #("foo" ...)? Nothing other than propertized strings uses it?

I didn't check the C code, but I believe that's right, yes.

> Note that #(foo %) is open to optimizations: it doesn't have to be
> exactly (lambda (%) (foo %)),

(lambda (%) (foo %)) is also open to optimizations, and actually to
probably exactly the same optimizations.

Not that we bother to perform any anyway (because there really aren't
many such optimizations that can be done reliably without a fair bit of

> Just to show you that weird things are happening either way:
>     (defun projectile-unixy-system-p ()
>       "Check to see if unixy text utilities are installed."
>       (--all? (executable-find it) '("grep" "cut" "uniq")))

It's OK.  Languages evolve, and I'm fine with it.  I'm not fond of
anaphoric macros (I tend to think of them as "anti-hygienic macros"
instead), but that's only a matter of taste.


reply via email to

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