W3C home > Mailing lists > Public > public-media-capture@w3.org > May 2013

Re: Questions/Comments on Media Stream Recording

From: Robert O'Callahan <robert@ocallahan.org>
Date: Sat, 25 May 2013 01:33:45 +0800
Message-ID: <CAOp6jLbeobaTJhm7oRq-k-JDOuqRWzHHwo7=v4YW2B_ffR70qA@mail.gmail.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>
Cc: Adam Bergkvist <adam.bergkvist@ericsson.com>, "Frederick.Hirsch@nokia.com" <Frederick.Hirsch@nokia.com>, "mandyam@quicinc.com" <mandyam@quicinc.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On Fri, May 24, 2013 at 9:04 PM, Jim Barnett <Jim.Barnett@genesyslab.com>wrote:

>   It's just a quibble about style.  When I used to program in C++, I was
> taught never to write code like:
>
>    // or if you have a reference to the recorder you
>    // can access it directly
>    recStream = recorder.stream;
>
> The idea was that accessing instance variables directly broke
> encapsulation, and that it was better to always use an accessor function:
>     recStream = recorder.getStream()
>

This does not apply to the Web at all. In Web APIs, it's completely normal
(and indeed, encouraged) for attributes to be part of the public API of an
interface.

Rob
-- 
q“qIqfq qyqoquq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qyqoquq,q qwqhqaqtq
qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq qsqiqnqnqeqrqsq
qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qtqhqeqmq.q qAqnqdq qiqfq qyqoquq
qdqoq qgqoqoqdq qtqoq qtqhqoqsqeq qwqhqoq qaqrqeq qgqoqoqdq qtqoq qyqoquq,q
qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq
qsqiqnqnqeqrqsq qdqoq qtqhqaqtq.q"
Received on Friday, 24 May 2013 17:34:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:17 UTC