Tree pretty printer

108 views
Skip to first unread message

Martin Clausen

unread,
May 1, 2018, 7:01:43 PM5/1/18
to Clojure Dev
I am considering submitting a tree structure pretty printer, would that be welcome?


I imagine it would take a dispatch function and a value for branches and one for leaves and perhaps an optional map of symbols to use for the construction of the tree.

Cheers,

Martin

Alex Miller

unread,
May 1, 2018, 7:06:33 PM5/1/18
to cloju...@googlegroups.com
Hi Martin,

I don't think we'll add something like this, but seems like a useful library.

Alex

--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev+unsubscribe@googlegroups.com.
To post to this group, send email to cloju...@googlegroups.com.
Visit this group at https://groups.google.com/group/clojure-dev.
For more options, visit https://groups.google.com/d/optout.

Martin Clausen

unread,
May 6, 2018, 8:47:10 AM5/6/18
to Clojure Dev
Alex,

Thanks for the quick and clear feedback. For my (and perhaps that of others) edification would you share your thinking on why not? 

My thinking was that such a function would seem quite parallel to the print-table function already included in clojure.pprint.

Cheers,

Martin


On Wednesday, May 2, 2018 at 1:06:33 AM UTC+2, Alex Miller wrote:
Hi Martin,

I don't think we'll add something like this, but seems like a useful library.

Alex
On Tue, May 1, 2018 at 4:02 PM, Martin Clausen <martin....@gmail.com> wrote:
I am considering submitting a tree structure pretty printer, would that be welcome?


I imagine it would take a dispatch function and a value for branches and one for leaves and perhaps an optional map of symbols to use for the construction of the tree.

Cheers,

Martin

--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev...@googlegroups.com.

Alex Miller

unread,
May 6, 2018, 11:07:51 AM5/6/18
to cloju...@googlegroups.com
Well first, my default answer for adding stuff to core is no, and I don't think the frequency of need for this changes that. Secondly, I think text trees are pretty unwieldy (whereas text tables are more commonly useful) and generally UIs that support folding functionality tend to be better (and that actually exists in clojure.inspector already). And finally, I think there are probably a lot of options you might to configure such a tree and all that just seems to suggest putting it in an external library instead.

To unsubscribe from this group and stop receiving emails from it, send an email to clojure-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages