Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

How is it more DRY? And are you arguing that character count matters here?

Personally I think it's a bit silly and I have had debates about it with people in the past. But a lot of devs do feel strongly that it matters. Just look at the debates on Javascript module import Syntax. We have the fat arrow because it cuts down on character count, etc.

Specifically:
customElements.define('fancy-button', FancyButton);

Is more DRY than:

customElements.define('fancy-button', FancyButton, {extends: 'button'});

The first example doesn’t extend anything. If the extends option actually causes the inheritance of some characteristics, the amount of code that would have to be written and transmitted to make up for the lack of inheritance more than accounts for the few extra bytes, I think.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-265169854

Received on Tuesday, 6 December 2016 14:55:34 UTC