Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
automatically puts list around functions in threading macros if absent #132
I guess the only reason this wasn't included in the first pass was that while it's easy to add it in, it's impossible to remove later on if we decide it's not a good idea. Because of this, we should think a little more about whether it's the right thing for Fennel and not just do it because it can be done easily.
I don't feel strongly about it either way, but to me the advantage of the current way is that the code looks closer to its actual meaning. To people who haven't already used Clojure, it's easier to see the correspondence between the input and the resulting macroexpansion when the parens are there. The downside is ... slightly more typing, I guess.
In Clojure, you commonly see forms like
If that's the prevailing view I'm OK with not merging this feature. We might want to look at the current behavior:
if we don't want to coerce the forms to lists, perhaps we should explicitly error with an informative message when compiling if they aren't lists