If this isn't going to be added to the core (and I don't think it should), then there would need to be some work done on exposure and making sure everyone who wants this functionality knows "look here first and only roll your own if this isn't specific enough". Maybe a Wiki page acting like a swiss army knife of useful single purpose packages that the community has standardized? Also things like Greg Hendershott's threading macro blog post would need to be updated to point to the standardized version, along with other places "non standardized" versions of the functionality have been documented.
As for the actual package, I'm a strong proponent of a non-macro version that's just the reverse of compose, mostly because it plays very nicely with anonymous macro functions like fancy-app. I'm a bit biased as that's the one I made in my point-free package however. Macro versions are nice too, but I prefer the flexibility of an actual function for most purposes.
On Oct 8, 2015, at 12:02 AM, Jack Firth <jackh...@gmail.com> wrote:
As for the actual package, I'm a strong proponent of a non-macro version that's just the reverse of compose, mostly because it plays very nicely with anonymous macro functions like fancy-app. I'm a bit biased as that's the one I made in my point-free package however. Macro versions are nice too, but I prefer the flexibility of an actual function for most purposes.
To be fair, there are plenty of good reasons why duplication / fragmentation would exist, many of them ultimately beneficial to the underlying system. Fragmentation is not per se bad. Standardization is not per se good (because it imposes its own costs & consequences).
On Oct 8, 2015, at 2:27 PM, Alexis King <lexi....@gmail.com> wrote:The original threading macro is a simple macro that unwinds nested function application. Implementation aside, I find that the most intuitive way to visualize it—introducing binding makes that more complicated, not less.
On Oct 8, 2015, at 4:48 PM, Jay McCarthy <jay.mc...@gmail.com> wrote:
A key thing that Remix has is buttery C-like syntax for infix dots. So
you can write r.ul.x and it might be the same as (posn-x (rectangle-ul
r)) if `r` were bound to a "dot transformer" that looked for .ul and
so on.
On Oct 8, 2015, at 4:51 PM, Jack Firth <jackh...@gmail.com> wrote:Looking at that one, I'm against back-referencing N clauses with (<> n). I find it very difficult to read, and it strikes me as particularly fragile if you're inserting or removing steps into the flow as you edit it.
Trying to count back steps (especially if they're not formatted to all be one per line) is mental juggling I don't want to do, and it muddies my thought process. If I really want to go to that effort to avoid naming things, I'll use currying and point free composition operations.