logoalt Hacker News

nico • today at 3:05 PM • 1 reply • view on HN

> and all the other stuff that C++ frameworks are terrible at, but which is a doddle in HTML/CSS/JS

This is very interesting. I know that coding string-related stuff with C/C++ can be incredibly tedious and error prone (even hard security-wise). But all the stuff in the web-related stacks/libraries in other languages, is either already somehow being transcompiled to C to execute, or could be relatively easily ported/reused by directing an LLM/agent to do it

Do you think that could work to make C/C++ better at this? What things would you import/copy from elsewhere?


Replies

julesrms • today at 3:42 PM

Strings are trivial in C++. Drawing 2D graphics is fine, many libraries do it. Creating old-fashioned component frameworks (like Qt, JUCE, etc) is easy. I implemented all those things on my own, decades before AI.

The hard bit is when you have complex, responsive layouts involving text. (And styling it)

Something seemingly trivial like an agent-style chat containing markdown text blocks, where it's expandable and smoothly scrollable is insanely difficult. The only frameworks that do this well are browsers, and the amount of horrible, horrible logic hidden inside them to make it look easy is hard to believe.

And since in many agents you're also going to want to display actual HTML, unless you're going to embed a browser engine in your C++ library, that's just not doable.

➕ show 1 reply