Re: MI & pretty-printing

Vladimir Prus
2009-08-20T05:30:46Z

Tom Tromey wrote:

>>>>>> "Volodya" == Vladimir Prus <vladimir@codesourcery.com> writes:
>
> Tom> I hesitate to change this because it isn't clear to me that "{...}"
> Tom> is a universally good choice for all GUIs and all printers.
>
> I'm reconsidering this. When would the immediate value of a varobj with
> children be of interest? It certainly doesn't seem to be for
> non-pretty-printed varobjs.

Well, I don't have any case at hand where immediate value would be of
*that* great value. FWIW, when I run into "too long string value"
issue I though about was to have shorter summary for vector, e.g. "[2]",
but then figured it's additional work, and folks did not complain
about "{...}" so far.

>
> Volodya> Do we have a mechanism how pretty-printer can use different
> Volodya> string rendering for MI and CLI?
>
> Not at present. We could add one, of course, but I have been trying to
> push the current simple design as far as it would go. Partly this is
> just stubbornness but also I do think that simplicity has some intrinsic
> virtue, at least when you can get away with it.

FWIW, I was driving exactly at this simplicity point :-)

>
> Volodya> And {...} seems like the most conservative thing
> Volodya> possible. Then, if we run into type that both have children and
> Volodya> have string rendering that makes sense in MI, we can introduce
> Volodya> some solution?
>
> Yeah. I'll do this.

Great, thanks!

- Volodya