4 ms·
It's amusing to see that the web is haphazardly rediscovering decades of CS research. They finally figured out how to write subroutines into HTML. Also, don't
by striking 11y ago
It's amusing to see that the web is haphazardly rediscovering decades of CS research. They finally figured out how to write subroutines into HTML.
Also, don't web components require JS, due to the document.registerElement call? If that's true, they've even failed to write web components into plain HTML. They're just gluing another JavaScript framework onto the web, the same way people expected would happen with prototypeJS.
- jrajav 11y agoYou can style any custom element just fine without using document.registerElement, and use it like a native element if it's extending one. You only need to register it to do Javascript-specific things just as attaching functions to lifecycle callbacks, so it really isn't any different from being "required" to do `document.getElementById('#id').addEventListener(...)` in order to use plain DOM events.
- hacker_9 11y agoYou are comparing to JS, as if this is a good thing?
- magicalist 11y ago> It's amusing to see that the web is haphazardly rediscovering decades of CS research. They finally figured out how to write subroutines into HTML. Standards are hard and take a long time. C++ hasn't been haphazardly rediscovering decades of lambda expression use, for instance. Web components have been in development in some form for more than a decade.
- hacker_9 11y agoDid you just compare C++ to JS/CSS/HTML?? C++ as old as it is, is still leagues ahead of JS. Honestly was this a joke post?
- ehnto 11y agoJS, CSS and HTML were never designed to be a fully fledged programming application development solution, and no one is suggesting that it is supposed to be either. They weren't even designed in paralell. Now that this has become a requirement, the slow moving spec machine is trying to resolve the issue. Is this a problem for you? Because it seems to be.
- spankalee 11y agoIt's not really that amusing, as if these "web" people aren't intimately familiar with CS research or basic principles of programming. The web wasn't designed ahead of time for all the uses it has today, it's evolved into its current role, and often by developers forcing it to do their bidding. It's also not defined by any single entity and the standards process takes a long time. Of course something that started as an application framework would have had "subroutines" and custom components. That's no reason to deride the efforts to address that now. As for requiring JS, you are correct. A declarative custom element standard will be needed before we can have extensible HTML without script. But given that a declarative standard will be a subset, in term of power, of the imperative API, it's best to see what the most common used parts of the imperative API are before baking defining the declarative version. If you look up initial versions of MDV and web components, you'll see declarative elements in there.
- hacker_9 11y agoYou speak as if web tech was made by the smartest people, and is cutting edge or something? The web is just politics. It is a total failure of technology - in fact, failure built upon failure - and yet it keeps it's head above the water because there is no alternative that can serve content to so many people.