On Tue, Feb 3, 2009 at 8:24 AM, Konrad Hinsen <konrad.hin...@laposte.net> wrote: > > On Feb 3, 2009, at 14:49, Mark Volkmann wrote: > >> I see from the feedback so far that my statements are wrong. However, >> I think it's true that there are *some* things you can do in a >> function that you cannot do in a macro, and perhaps vice-versa. Are >> those clearly documented anywhere? If not, what are some? > > I can't think of anything that would be "forbidden" in a macro but > "allowed" in a plain function. There are many things that don't make > sense in a macro, of course: launching agents, opening windows, ...
Now I remember what I was thinking about. This isn't so much a difference between macros and functions as it is a rule about something you cannot do in a macro. Quoting from "Programming Clojure" ... "You cannot write a macro that expands to any of the syntactic sugar forms ... For example, you cannot write a macro that expands to (Math/PI)." "when you are writing macros, make sure they expand to ordinary forms, not any of the sugared short forms." -- R. Mark Volkmann Object Computing, Inc. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---