plumatic / plumbing

Prismatic's Clojure(Script) utility belt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is plumbing the right project for 'if-let-all' macro?

crocket opened this issue · comments

if-let-all macro is explained on https://groups.google.com/forum/#!topic/clojure/l8vGw458nFQ
I'm looking for a project to contribute if-let-all to. Is plumbing the right project?

Thanks for your potential contribution!

plumbing.core intends to be "the stuff we wish was in clojure.core". if-let-all is appropriately generic, but I'm not sure if it's sufficiently useful -- I can't recall many occasions where I've wished it existed.

Can you please provide a real example or two that prompted you to write it, and we'll think about it? Thanks!

On the google group, Isaac Zeng posted a better version of if-let-all, called if-let* on https://gist.github.com/gfZeng/8e8e18f148d5742b064c. if-let-all doesn't support destructuring, but if-let* does.

I personally haven't encountered such an issue because I'm a clojure beginner, which means I didn't write that macro myself. I heard a few people complaining that they sometimes wanted if-let to accept multiple bindings, so I asked an advanced clojure programmer to write if-let-all, and he wrote it for me.

Please have a look at https://gist.github.com/gfZeng/8e8e18f148d5742b064c and decide it for yourself.

Thanks for the details. Given that we want to be conservative about adding things to plumbing.core, I think we'll pass on this for now. That said, we're open to the idea in the future if anyone wants to advocate and brings some compelling use cases.