4 ms·
> The only potential issue with immediate mode is performance, since we need to re-render the entire UI on every state change. How this made it to HN front pag
by Oras 2mo ago
> The only potential issue with immediate mode is performance, since we need to re-render the entire UI on every state change.
How this made it to HN front page?
- pedro_movai 2mo agoI think the author is saying a potential issue of a vanilla implementation of immediate mode. The following text explains that there is already many optimizations for this
- inigyou 2mo agoNothing in HTML is immediate mode. Any framework with a DOM is retained mode, by definition.
- pedro_movai 2mo agoBut the api is trying to simulate immediate mode using DOM
- inigyou 2mo agoThat's called an "abomination". The advantage of immediate mode is not storing a DOM. If you write immediate-mode code but it stores a DOM anyway then it's the worst of both worlds.
- Warwolt 2mo agoHow would you do layouting without a tree structure in place? Not really sure what you're getting at here
- inigyou 2mo agoYou have discovered one advantage of retained-mode designs.
- sroerick 2mo agoIsn't that literally React? I find it so immeasurably funny that in his effort to simplify code and invent immediate mode UI, Casey Muratori accidentally invented React
- blenderob 2mo ago> I think the author is saying a potential issue of a vanilla implementation of immediate mode. And you (pedro_movai) == the author? So you are saying that potential issue? Sorry, technically you are right that the author is saying that but I got confused with you referring to yourself in third person. Nothing wrong with it. Just want to confirm if you're the author.
- deleted 2mo ago[deleted]
- mollerhoj 2mo ago"I think the author is saying" - Wait, are you not the author? This seems dishonest.
- gulugawa 2mo agoI think the high quality of the author's website is more relevant than theoretical concerns about performance. Loading performance on the s website is quite good, and it appears to be using the JS library described in the blog post. I also saw that pages were loading around 60kb or JavaScript or less. Also, from looking at the author's GitHub profile, it appears that they do not make significant use of LLMs and actually took the effort to write the code by themselves.