RE: Questions/Comments on Media Stream Recording

Suits me.  I won’t add an accessor function.


-          Jim

From: rocallahan@gmail.com [mailto:rocallahan@gmail.com] On Behalf Of Robert O'Callahan
Sent: Friday, May 24, 2013 1:34 PM
To: Jim Barnett
Cc: Adam Bergkvist; Frederick.Hirsch@nokia.com; mandyam@quicinc.com; public-media-capture@w3.org
Subject: Re: Questions/Comments on Media Stream Recording

On Fri, May 24, 2013 at 9:04 PM, Jim Barnett <Jim.Barnett@genesyslab.com<mailto: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 18:53:59 UTC