[Devel] Feature request: error/debug message extension.

Gabriel M. Beddingfield gabrbedd at gmail.com
Sun Jan 15 12:45:54 PST 2012


On 01/15/2012 01:58 PM, David Robillard wrote:
>> So we want to put *THAT* complexity on the host??
>
> If we must choose, yes!  Obviously.  I don't see why the heck you think
> it's better to have it in the plugins...

Requiring hosts to do simple substitutions is fine with me.

 From the very start, I've been fine with something like this:

     format_string(s, BUFSIZE, "number = ?", (double)3);

...and if you want more control over the formatting then you need to 
bring your own.  This sort of thing is very easy to implement RT-safe.

I'm *not* fine with requiring hosts to support something like this:

     snprintf(s, BUFSIZE, "number = \\%-08.3g%%", (double)3);

...UNLESS there is an RT-safe implementation of snprintf() available 
somewhere.  (I'm even OK if the implementation actually ignores 
everything except the type that's given.)

-gabriel


>> The plugins have the option of NOT using printf&  co. for their
>> strings... but can still have string formatting.
>
> This seems to keep coming back to admitting this complexity is required,
> and you proposing it belongs in each and every plugin rather than the
> host.  I do not agree, and I will never agree, without a really good
> argument to convince me otherwise.
>
> There are vastly more plugins than hosts, and there are vastly more new
> developers who want to dive in to plugin writing than people who want to
> (or need to) write a host.  Code duplication is the best universal
> metric for bad design decision I know of.  Offsetting all of that
> requires good reasons.  The cons are obvious (they are the ones that
> always apply, which is why "complexity belongs in the host" is an LV2
> maxim and the default position).  *Why* do you think this is better?
>
> -dr
>
>




More information about the Devel mailing list