Hacker News new | past | comments | ask | show | jobs | submit login

What we need is a "strict mode" HTML. Number of APIs available to web platform is getting out of hand. Using ES6 module system we can clean up the web API landscape.

Here is the idea: you declare your document to be in strict mode:

    <!DOCTYPE strict>
In this mode you don't have access to any API unless you import it. You need to import CSS layout systems like regular box model or basic APIs like query selector. You also need to import each html element you use. This way browsers don't have to take into account every possible CSS property or html element when doing layout or painting.

After we got that, then you can import your own implementation of standard modules that is written using APIs introduced by Houdini

Here is an example:

    import "html/div"
    import  "css/flex"
    import  "dom/query"



> After we got that, then you can import your own implementation of standard modules that is written using APIs introduced by Houdini

Reinventing the platform using JavaScript in that way is not going to be good for performance. At least right now, until at the very least shared memory multithreading is available.

I also want to call attention to this:

> This way browsers don't have to take into account every possible CSS property or html element when doing layout or painting.

But in order to get good performance we want to take every possible CSS property into account. Performance is about being able to make simplifying assumptions (especially on the GPU, where state changes are costly). We want to make global optimizations based on the contents of the whole page instead of having everything painted using programmatic APIs, which are black boxes to us.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: