Re: [whatwg/dom] Removing event listeners through an identifier (#208)

> Every new complexity we add impose a more cognitive stress on someone trying to learn how to code in the Web.

Again, if they don't need it, it doesn’t get in their way. They can just use strings and symbols until the end of time.

Understanding someone else’s code could be an issue, but for a common pattern like this, it's better to standardize one natural way of doing it than to have a number of different helpers and patterns that novices have to process. It's so common in a method signature to accept either a singular item or an array/iterable for multiple that many users might even guess it (and be surprised if it doesn’t work).

Anyhow, if we really want to find out whether that is useful and how much, we should probably ask the jQuery maintainers instead of just guessing based on our experience (or lack thereof). jQuery has allowed multiple [namespaces for its events](https://api.jquery.com/on/) for years, so I suspect they may have some idea of usage stats. @addyosmani, any thoughts?

(notice how the use case for multiple namespaces in their docs is the same I mentioned earlier in this thread: one for plugin name, one for purpose)

> Are you sure having the sequence support would be useful in 10 years? How about in 20 years? Any new API surface we're adding today should be looked at in that kind of timespan, not just next 2-3 years.

ZOMG really, *that’s* how standards work?!? I would never have guessed!!!11 What do I know about standards after all? 🙄

I don't see why if multiple groups are useful today they wouldn't be in 10 or 20 years. It's not a transitional feature of any sort. The same reasons are still going to exist. Do you have any reasons to think that is not the case? Given that you don't seem to understand why multiple groups are needed today, it seems odd that you would see those (nonexistent from your perspective) reasons going away in 10 or 20 years.

@domenic Just wondering, would the group info be available on the event object? Should it? Maybe something to think about.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/208#issuecomment-313014964

Received on Wednesday, 5 July 2017 06:41:45 UTC