In response to a concern raised on the #fennel IRC channel I made a PR
to auto-wrap threading macro args in lists, as would be done in
Clojure code
https://github.com/bakpakin/Fennel/pull/132
The point was made that it's risky to adapt that permissive behavior,
because it's hard to undo once code depends on it.
What's the feeling about this? should (-> x f g) be auto converted to
(-> x (f) (g)) ?
I think there's a solid consensus that if we choose not to
automatically make the forms lists when compiling, we should provide a
helpful error message while compiling, rather than the current strange
behavior and cryptic error.
I understand technomancy's concern over the auto conversion not being as
useful as in Clojure, but I think there are many other cases where it
can be applied besides looking up values in nested table. Also, I can't
imagine what other possible meaning a lone symbol in the threading macro
could have. The only other future syntax I can imagine would having some
dsl syntax like the convention of using :else in an if expression, but
this seems unlikely.
In general, I think (-> x f g print) looks nicer than (-> x (f) (g)
(print)).
On Tue, Jan 01, 2019 at 04:52:52PM -0800, Justin Smith wrote:
> In response to a concern raised on the #fennel IRC channel I made a PR> to auto-wrap threading macro args in lists, as would be done in> Clojure code> > https://github.com/bakpakin/Fennel/pull/132> > The point was made that it's risky to adapt that permissive behavior,> because it's hard to undo once code depends on it.> > What's the feeling about this? should (-> x f g) be auto converted to> (-> x (f) (g)) ?> > I think there's a solid consensus that if we choose not to> automatically make the forms lists when compiling, we should provide a> helpful error message while compiling, rather than the current strange> behavior and cryptic error.
Calvin Rose <calsrose@gmail.com> writes:
> In general, I think (-> x f g print) looks nicer than (-> x (f) (g)> (print)).
Cool; I have no objection to this. I just wanted to make sure we merged
it for the right reasons rather than just doing what Clojure does.
-Phil
Hey everyone, Fennel 0.2.0 is out and up on Luarocks!
A number of changes and improvements have been made
to the fennel compiler and library, including new and
improved threading and match macros in the core
macro library. I won't list them
here, as they can be found in changelog.md.
https://github.com/bakpakin/Fennel/blob/master/changelog.md
A lot of people have been contributing code to Fennel,
which is really awesome. If you have more suggestions.
code to contribute, bugs to report, or use cases that
could be made smoother, let us know on the mailing list,
the irc channel, or in GitHub issues.
We also look forward also to having Fennel packaged for several
Linux distros! You can install fennel from the Arch User Repositories
(AUR), and we hope to have fennel packaged for Debian in the near
future.
- Calvin