3 2

behavior of -> etc.

Justin Smith
Details
Message ID
<CAGokn9+4vudb9=4x+Q_=7qReggoPqjUCvA1_KV5FHdZ-WLBV8w@mail.gmail.com>
DKIM signature
pass
Download raw message
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.
Details
Message ID
<20190102051047.GA7666@calvin-p51.localdomain>
In-Reply-To
<CAGokn9+4vudb9=4x+Q_=7qReggoPqjUCvA1_KV5FHdZ-WLBV8w@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<874larzj49.fsf@hagelb.org>
In-Reply-To
<20190102051047.GA7666@calvin-p51.localdomain> (view parent)
DKIM signature
missing
Download raw message
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

Fennel 0.2.0

Details
Message ID
<20190118010015.GA25324@calvin-p51.localdomain>
In-Reply-To
<874larzj49.fsf@hagelb.org> (view parent)
DKIM signature
pass
Download raw message
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