On Jan 12, 12:19 pm, Chris Dean <ctd...@sokitomi.com> wrote: > One downside of the new macros is that there is now one more check done > at runtime for every use. There used to be just the impl-enabled? and > now there is a instance? call as well.
True. One optimization I could make is to cover the most common case (calling with a string literal as the second arg) by checking for (instance? String x) outside of the syntax quote. Then again, that case (and perhaps others) may be obviated by the JVM optimizer. > > Also, I think format requires at least one arg, so (logf :debug) isn't > valid. Probably should change the signature to > > (defmacro logf [level fmt-or-throwable & args] ...) Which is why I added the arglist metadata (shown via doc): [level fmt & args] [level throwable fmt & fmt-args] Also, the -or- is somewhat misleading.
-- 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