Re: [webrtc-stats] Added 'objectDeleted' attribute

Sorry for the late reply, but I don't approve.

Putting `objectDeleted` in the base class may be an implementation convenience, but it alters the contract of every stats object, and implies that implementations suddenly may return a whole second set of objects with this boolean set to `true`, which would break existing code (which assumes only non-deleted obects). That's a big API change to foist on users IMHO. Users now essentially need to test this member for every stats object before reading or trusting its data to be current, whereas before they didn't need to do this.

Do we really need this for all stats objects? What sub-set of objects can be deleted?

>From an API point alone, overloading an API with a boolean is generally considered bad design. Would it be cleaner, clearer and more performant to introduce a `getDeletedStats()` function?

We broke `getSources()`  into `getContributingSources()` & `getSynchronizationSources()` over less.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/pull/262#issuecomment-350810504 using your GitHub account

Received on Monday, 11 December 2017 18:17:21 UTC