nicferrier / emacs-noflet

noflet - nic's overriding flet, for fleting functions for the purpose of decorating them
72 stars 17 forks source link

Lazy evaluation #5

Closed rejeep closed 10 years ago

rejeep commented 10 years ago

Hi,

I have a project where I want a DSL looking like this:

(name "foo")
(execute
 (compile "bar")
 (compile "baz"))

Basically I want to read a couple files with this DSL. I want name to evaluate directly, but I don't want the execute block to. Is there any way for noflet to be lazy in the arguments to compile so that I can save the state and evaluate it later? The only way I can think of is:

(name "foo")
(execute
 '(progn (compile "bar")
         (compile "baz")))

But that's not as nice.

nicferrier commented 10 years ago

Surely you want macrolet for that?

rejeep commented 10 years ago

Didn't know about that one, will check it out. Thanks!

Btw, will noflet ever support macros like that?

nicferrier commented 10 years ago

I don't think so since macrolet already does it why would you want it to?

rejeep commented 10 years ago

Yes, just asking. Thanks!