public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: "Noam Yorav-Raphael" <noamraph@gmail.com>
Cc: archer@sourceware.org
Subject: Re: Pretty-printed MI vars with children get "{...}" instead of the wanted string
Date: Wed, 09 Sep 2009 12:40:00 -0000	[thread overview]
Message-ID: <200909091640.50374.vladimir@codesourcery.com> (raw)
In-Reply-To: <b348a0850909090343k641a6499j4ac207a139a639e6@mail.gmail.com>

On Wednesday 09 September 2009 Noam Yorav-Raphael wrote:

> Keeping things stable is, of course, a sensible thing to do.
> 
> But I still have a question. When I do a simple "print" of an object
> with a pretty-printer, I get something like:
> 
> $1 = x=0 = {
>   s = {a = 0, b = 0},
>   x = 0
> }
> 
> That is, both the to_string() result and the children are printed. So
> why should the std::vector to_string() return a large string with all
> the elements in the vector, if whenever it's printed all the elements
> are printed again after it?
> 
> What I'm saying is this: It seems to me that for both CLI and MI, if a
> pretty-printer provides the children() method, its to_string() methods
> should return a short abstract of the object's content, not the full
> content. And if that is the case, there's no reason to hide the
> to_string() result in MI.
> 
> What do you think?

I do not know why in the vector pretty printer produces such a long
string. Note that it does not duplicates contents, just uses too may
words to say what the size and capacity is.

- Volodya

  reply	other threads:[~2009-09-09 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09  7:21 Noam Yorav-Raphael
2009-09-09  7:57 ` Vladimir Prus
2009-09-09 10:43   ` Noam Yorav-Raphael
2009-09-09 12:40     ` Vladimir Prus [this message]
2009-09-09 21:54       ` Noam Yorav-Raphael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909091640.50374.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=archer@sourceware.org \
    --cc=noamraph@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).