All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de,
	ffado-devel@lists.sf.net
Subject: Re: [PATCH 06/10] ctl: deprecate APIs to add an element set with a single element
Date: Wed, 15 Jun 2016 08:59:30 +0200	[thread overview]
Message-ID: <s5hziqnndil.wl-tiwai@suse.de> (raw)
In-Reply-To: <5760FC45.6060000@sakamocchi.jp>

On Wed, 15 Jun 2016 08:57:09 +0200,
Takashi Sakamoto wrote:
> 
> On 2016年06月14日 20:46, Takashi Iwai wrote:
> > On Tue, 14 Jun 2016 13:25:16 +0200,
> > Takashi Sakamoto wrote:
> >>
> >> Hi,
> >>
> >> On Jun 13 2016 21:51, Takashi Iwai wrote:
> >>> On Sun, 12 Jun 2016 10:16:07 +0200,
> >>> Takashi Sakamoto wrote:
> >>>>
> >>>> When comparing old APIs (to add a single element) with new APIs (to add
> >>>> an element set), the latter has an benefit to get full identical
> >>>> information for a first element in the element set. Furthermore, in
> >>>> previous commit, the old APIs become simple wrappers to the new APIs.
> >>>> Therefore, there's few intentions to use the old APIs.
> >>>>
> >>>> This commit deprecates the old APIs to encourage the usage of new APIs.
> >>>
> >>> In general, it's a bad idea to deprecate an API that has been actually
> >>> used, and even a worse idea to give a link warning.  We've done
> >>> deprecation for some API functions in the past, and it wasn't a really
> >>> smart move.  But it was still justified that they were really unused
> >>> API functions.  In this case, however, it's commonly used API.  That's
> >>> a big difference.
> >>>
> >>> I know several system libraries like Gtk+ often deprecating API
> >>> functions.  But it's more annoying than useful for developers and
> >>> users.  Unless you are masochistic, the likely first reaction after
> >>> seeing such a warning is: "upstream sucks again".
> >>
> >> I just added the link_warning() by immitating these old APIs such as
> >> snd_pcm_hwsync(). In short, I assumed that it's a fashion of this
> >> userspace library to use compiler/linker functionalities even if it's
> >> against usual ways to maintain APIs in userspace libraries.
> >
> > Yes, we have had such things, and as mentioned, it was a bad idea,
> > after all.  The deprecation doesn't help maintaining the stuff.
> > You don't need to follow our own bad attitude again.
> >
> >> (I'm not so strange developer, just foreigner to this project without
> >> enough documentations.)
> >>
> >> For the deprecation, I basically agree with you. But there might be
> >> exaggeration about usage of these APIs. They're rarely used, I
> >> think. If you know actual application programs to use them, please
> >> inform them to me. But I know discussions about the population of
> >> these APIs are not a good direction in this case.
> >
> > Right, it's not the only indication.
> >
> >> My main intention of this patchset is to add the new APIs. These APIs
> >> are completely upper compatible to the old APIs, and have benefits I
> >> described. In fact, deleting public APIs is not preferable, but
> >> deprecating them and still maintaining sometimes has advantages to
> >> motivate users to start using the new ones. For this purpose, I think
> >> it better to add 'deprecated' comment into documentations of old APIs.
> >
> > It depends.  The deprecation and the recommendation are different
> > behavior.  The former is needed only when the old API is really
> > harmful or doesn't work any longer.  In such a case, giving a link
> > warning is helpful so that user can know of it.
> >
> > Meanwhile, the latter is done everywhere.  It's a programming
> > practice, and let users choose a better one.  That being said, it'd be
> > good to add recommendation for a better API in the documentation. But
> > it's never meant to deprecate some old API function.
> >
> > Again, deprecation doesn't help much from maintenance POV.  I can
> > judge it from my long experiences in both upstream maintainer and
> > downstream packager sides.  It may help hardening some serious errors
> > if the old API were really bad.  But that's all.
> 
> OK. I respect your long work for Linux system and can agree with the
> judgment. Let me drop this patch from patchset I'll post tonight. In
> the patchset, some comments are newly added to indicate the
> recommendation.

Great, that's appreciated.

> And how about the other parts? Are there any inappropriate codes or
> comments?

They are good.  Let's keep them.


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2016-06-15  6:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12  8:16 [alsa-lib][PATCH 00/10 v2] ctl: add APIs for control element set Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 01/10] ctl: add an overview for design of ALSA control interface Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 02/10] ctl: improve comments for handling element data Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 03/10] ctl: add functions to add an element set Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 04/10] ctl: improve comments for API to add an element of IEC958 type Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 05/10] ctl: change former APIs as wrapper functions of element set APIs Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 06/10] ctl: deprecate APIs to add an element set with a single element Takashi Sakamoto
2016-06-13 12:51   ` Takashi Iwai
2016-06-14 11:25     ` Takashi Sakamoto
2016-06-14 11:46       ` Takashi Iwai
2016-06-15  6:57         ` Takashi Sakamoto
2016-06-15  6:59           ` Takashi Iwai [this message]
2016-06-15  7:23             ` Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 07/10] pcm: use new APIs to add a control element set for softvol plugin Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 08/10] ctl: add explaination about threshold level feature Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 09/10] ctl: improve API documentation for threshold level operations Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 10/10] ctl: add test program for control element set Takashi Sakamoto

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=s5hziqnndil.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sf.net \
    --cc=o-takashi@sakamocchi.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.