On Sep 17, 7:33 pm, Gorsal <s...@tewebs.com> wrote:
> Basically i need to redefine the meaning of a special form. While i am
> willing to change the name for things like ns to defpackage, i am not
> willing to change the name of forms like apply and defn to achieve my
> goals. Instead, i would like to redefine them for my own needs. Of
> course, i will be using the actual special form but will refer to it
> instead by its full name. So... Is there any way or hack that i can
> redefine a special form like defn as my own macro/function?
As Stuart already said, you can't redefine special forms, and I'm not
sure if dynamically redefining macros makes sense either, since
they're expanded at compile-time—changing them at runtime would be too
late. Furthermore, as far as I know, you can't even do it directly,
because you can't take the value of a macro to use in a binding form.
Binding *functions* like apply of course works normally using the
'binding macro, and *technically* you can change the underlying
function of a macro too, but... I can't imagine a situation where
you'd want that.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---