Affects Version/s: Release 1.6
Fix Version/s: None
This is more of a starting point for discussion than a feature request. It'd be easy to write and submit the patch, but I want to ask if it's a good idea, since it would alter the semantics of two core macros, '
> and '>>; and if it is a good idea, what considerations need to be balanced.
For threading macros, I'd like to special-case forms that begin with 'fn and 'fn*. It's often useful (but maybe a bad idea; that's why I'd like to start the discussion) to use the threading macros in conjunction with anonymous functions in addition to forms, like so (contrived example):
This won't compile; #(/ 1 %) expands to the form
modulo gensym, of course. The threading macro, not treating fn* and fn specially, alters that to:
which is a fn* with a non-symbol (illegal label) before its binding vector, raising an error.
Is this worth "fixing", or are the benefits to small to justify the added complexity of a special case in the ->, ->> threading macros?