kumarshantanu / dime

Dependency Injection Made Easy for Clojure
Eclipse Public License 1.0
30 stars 1 forks source link

Add shorthand version of expose meta data #5

Closed gzmask closed 6 years ago

gzmask commented 6 years ago

Instead of having to do (defn ^{:expose :foo} foo ...), can we just do `(defn ^expose foo ...) instead? Also defaulting the expose name to be same as function name.

kumarshantanu commented 6 years ago

I think (defn ^:expose foo ...) (^:expose rather than ^expose) is already supported. In fact, if any of the arguments has an :inject tag then :expose tag is automatically inferred for defn.

gzmask commented 6 years ago

Nice! My bad not finding that out, hope this bit got documented soon.

kumarshantanu commented 6 years ago

Actually, this bit is sort of alluded to in this section: https://github.com/kumarshantanu/dime/blob/master/doc/intro.md#understanding-injection-annotations