`show` methods for types

In this issue, @jeff.bezanson advises that we shouldn’t override how types are printed. But in some cases, particularly for type-level representations as @thautwarm is developing (and are used heavily in Soss), the default methods are way too verbose to be useful. Especially for interactive use, it’s critical to have a reasonable representation of types.

Jeff, has your opinion or advice changed on this? I understand your concern that a bug in displaying types could make debugging impossible. Is there a “safe” way to do this?

4 Likes

To add on this, the overloading of the show method was one of the causes for constant crashes on the VScode Julia plugin.
In my opinion, a possible solution for this could be similar to how getfield - getproperty works, using one to print the hierarchy of types (by default) and another to be available for overloading.

3 Likes