- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 12 Dec 2018 22:38:31 +0000 (UTC)
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/495/c446770997@github.com>
I don't think the percentage of slot-backed attribute is as high as 95+%. Especially if you take into account special setter logic that isn't just "set to the value", but also performs some state-checking or validation. That said, it's probably over 50%. (We'd need to do a survey to be sure.) My preferred way of threading this needle would be that slots should be explicit, but it should be easy to auto-generate getters (and optionally setters) from the slots. For example ``` interface CustomEvent { [[detail]]; get detail <- [[detail]]; // or (no separate slot declaration): any [[detail]] -> get detail; // or, using existing attribute syntax: [[detail]]; readonly attribute any detail <- [[detail]]; // or (no separate slot declaration): readonly attribute any detail <-> [[detail]]; } ``` My general feeling is also opposite @annevk's; I don't think there's any value in creating yet another convention for private state, and hoping people use it, without adding some code/spec-generation benefits at the same time, of the sort listed in his bullet points. Just relocating the same information from `<dl>`s or `<table>`s into IDL blocks does not seem worthwhile, and in fact seems like a bit of a layering violation, in that currently IDL only defines observable public facets of a class. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/495#issuecomment-446770997
Received on Wednesday, 12 December 2018 22:38:54 UTC