Subject: Re: improving ABI "survival rate"

Re: improving ABI "survival rate"

From: Gregor Jasny <jasny_at_vidsoft.de>
Date: Fri, 28 Nov 2008 18:44:02 +0100

Yang Tse wrote:
> Now, let's imagine that someone has used ares_setopt() to setup a
> couple of IPv6 nameservers. This information cannot be stored in a
> variable of the existing ares_options struct, so somehow it will be
> kept 'somewhere' before doing some sort of, some other new public
> functions, ares_init_channel_with_newstyle_opts(), and even
> ares_destroy_newstyle_opts().
>
> Now the user, or the library internally, decides it wants to
> initialize another ares_channel with the same options as one that
> already exists. If he/it uses the old ares_save_options() the newstyle
> options won't be copied so a ares_save_newstyle_options() is required.

How about a clone config method, and afterwards set/get to trim the new
options to perfect shape?

I really like the ALSA configuration interface. IMHO single
getters/setters are preferable over one vararg getter/setter.

See also
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=include/pcm.h and
highlight *snd_pcm_hw_params*

Just my 0.02$.

Gregor
Received on 2008-11-28