Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Gerdau <mgerdau@tiscali.de>
To: alsa-devel@alsa-project.org
Cc: "Clemens Ladisch" <clemens@ladisch.de>,
	"Lasse Kärkkäinen" <tronic@trn.iki.fi>
Subject: Re: ALSA C++ API updated for 1.0.16
Date: Tue, 26 Feb 2008 15:49:50 +0100	[thread overview]
Message-ID: <200802261550.03657.mgerdau@tiscali.de> (raw)
In-Reply-To: <47C3E387.20800@ladisch.de>


[-- Attachment #1.1: Type: text/plain, Size: 810 bytes --]

> > ALSA_HPP_CLASS& set_##name(...) { ...; return *this; }\
> 
> Is there a reason why you return the object itself?  Usually, returning
> an object implies that that object is a _different_ object with the
> setting applied, which would mean that the original object was _not_
> changed, but that isn't true here.

I'm not an OO design guru, but at least IOC (IBM OpenClass; it used to
be a rather powerful multiplatform GUI framework - before they made it
AIX only) used this very paradigma all over the place.

You were supposed to write statements like:
  obj.method1().method2().method3().___.method_n();

At least that's what all their example code looked like.

Best,
Michael
-- 
 Michael Gerdau       email: mgerdau@tiscali.de
 GPG-keys available on request or at public keyserver

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

  reply	other threads:[~2008-02-26 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 18:54 ALSA C++ API updated for 1.0.16 Lasse Kärkkäinen
2008-02-26 10:01 ` Clemens Ladisch
2008-02-26 14:49   ` Michael Gerdau [this message]
2008-02-26 16:59   ` Lasse Kärkkäinen
2008-02-27 11:50     ` Clemens Ladisch
2008-02-29  5:57       ` Aldrin Martoq
2008-03-01  0:56         ` Lasse Kärkkäinen

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=200802261550.03657.mgerdau@tiscali.de \
    --to=mgerdau@tiscali.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=tronic@trn.iki.fi \
    /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