3 ms·
Thank you for your answer. It makes sense in a historical context. But then, all languages since Objective-C seem to agree that namespacing is a good idea. The
by continuational 2y ago
Thank you for your answer. It makes sense in a historical context.
But then, all languages since Objective-C seem to agree that namespacing is a good idea. There's no debate there. Even JavaScript has modules now. So I can't help but wonder what makes web components unique in this regard.
- akira2501 2y agoThey link to the DOM and they can be instantiated purely from a source HTML file.
- afavour 2y agoProgramming languages, perhaps. HTML not a programming language, it’s markup. The best comparison I can think of is XML: it does have namespacing and in my experience it’s more annoying than not having it.
- eyelidlessness 2y agoIt’s really only annoying because it has exceedingly fussy semantics. And even then, it usually fades into background noise unless you’re using the exceedingly fussy semantics with minimal constraints. If you generally tend to use the same N set of namespaces and always use the same prefixes with them, it’s mostly just fine after you copypasta some boilerplate (or have tools do the boilerplate for you). (Yeah I work with XML day to day, yeah I might have some amount of Stockholm Syndrome associated with that.)