3 ms·
Not bad an idea at all! Hadn't considered bytecodes for layout algorithms, though I guess it would work with regular js as well, and I AFAICS Project Houdini is
by tannhaeuser 6y ago
Not bad an idea at all! Hadn't considered bytecodes for layout algorithms, though I guess it would work with regular js as well, and I AFAICS Project Houdini is about providing the necessary core rendering API.
- c-smile 6y ago> would work with regular js as well In principle JS may work but it is too slow for that. Function calls are too pricey, no integer arithmetic, etc. At least in my Sciter (https://sciter.com https://sciter.com) element's layout controller must have three methods: void calc_min_maxes() // calculates min-content and max-content int layout_width(int px_new_width); int layout_height(int px_new_height); so it is quite easy to add new layout modes. This way I've added () flow:grid(...); // a la display:grid flow:horizontal; // a la display:flexbox flow:stack; // no alternatives in standard CSS etc. Modern Java (and C# for that matter) are almost ideal for such things, especially considering modern effective JITs and VMs.