JuliaLang/julia — pull request #1139 by toivoh (2012-08-09 11:23:06+00:00)
Title: RFC: recshow

A first attempt at a `show` function that works for self-referential data, per this discussion:
https://groups.google.com/forum/#!topic/julia-dev/qdHQYQb-0XQ

It should work for sets, dicts, composite types that use the default `show`,
and other types that call `rshow` rather than `show` within their own `show` methods.
I wasn't sure how to get it to work with arrays, since they seem to use some `sprintf` and `showcompact` trickery to show themselves.

I've replaced most calls to `show` within `base/`, on the premise that `rshow` should be the user facing function. All of these might not be strictly necessary, but they don't add any overhead to normal shows either.

There's probably still some open issues:
* Presentation
* Is it possible to make `recshow` print incrementally
rather than consuming the whole object first?
* Names: `show, rshow, recshow`
* Array printing
* ...

Any feedback appreciated!