W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > October 2017

Re: [webrtc-stats] RTCMediaStreamTrackStats is four dictionaries in one

From: Harald Alvestrand via GitHub <sysbot+gh@w3.org>
Date: Wed, 25 Oct 2017 09:16:56 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-339267787-1508923015-sysbot+gh@w3.org>
I do worry about the multiplication of types. In OO, there's a design principle like "don't do with inheritance what you can do with containment".
The code smell associated with that is that when you add new elements, you have to add them to multiple subclasses. So far, there's no sign of that, so this seems to make refactoring sense.
And having it only in the spec and not observable is a Good Thing; if we got it wrong, we can refactor without impacting implementations.

GitHub Notification of comment by alvestrand
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/230#issuecomment-339267787 using your GitHub account
Received on Wednesday, 25 October 2017 09:16:57 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 9 October 2019 15:14:56 UTC