If I want to decompose a macro in Clojure, are there any differences (functional or otherwise) in declaring functions or macros to be the sub-components?
i.e. are there any differences between
(defn sub-function [x] ...)
(defmacro main-macro [x]
(sub-function x))
vs
(defmacro sub-macro [x] ...)
(defmacro main-macro [x]
(sub-macro x))
My list so far is:
I can't
recur
within my sub-macro but I can within my sub-functionI can't refactor my main macro to use a sub-macro as a higher order function
I can call my sub-function as a regular runtime function
Using sub-functions means I can't call them directly as macros but I could always wrap any sub-function within another macro if I want its functionality at compile time.
All these points are fairly trivial; Are there any conventions or stronger arguments for/against using sub-functions/sub-macros?