Re: gtk_message_dialog_new_with_markup() revisited



On Wed, 2003-08-13 at 05:09, Joshua N Pritikin wrote:
> On Wed, Aug 13, 2003 at 11:01:37AM +0200, Matthias Clasen wrote:
> > > What do people think?
> > 
> > I think I'd prefer to have a new format conversion for that. Something like
> > 
> > ..._with_markup ("<i>%m</i> %s", "this gets escaped", "this
> > <b>doesn't</b>");
> > 
> > But this wouldn't be any easier to implement, unless we want to rely on
> > glibc features.
> 
> I'm not sure how much my opinion counts, but the app I've been working
> on recently uses a lot of markup in various places.  It's pretty easy
> to get it right.  I don't find it very confusing.  The tricky bits like
> memory leaks & corruption are solved with valgrind & memprof.

I'm not sure that the fact that an experienced programmer can get
it right without too much trouble is all that useful evidence here.

The two possible arguments that I see as being possible here are:

 A) A large fraction of the cases where someone would want
    gtk_message_dialog_new_with_markup(), escaping of the 
    printf arguments is undesirable.

 B) Having escaping of the printf arguments is just too confusing,
    and people will keep having bugs where they don't
    expect escaping and it does get escaped.

I personally don't think either of these hold. As long as we 
*always* escape in any place where we mix printf and markup.
If we escaped in some places and not in others, that would
be confusing.

I think it's one of these things where it's unexpected
only if you have a fairly deep understanding of how printf() 
is implemented and most GTK+ programmers don't have that.

Regards,
						Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]