6 ms·
Maybe not all AIs, but LLMs benefit immensely from abstraction. They are trained on human code, and human code usually uses very high abstraction - so high abst
by Xirdus 12d ago
Maybe not all AIs, but LLMs benefit immensely from abstraction. They are trained on human code, and human code usually uses very high abstraction - so high abstraction is overrepresented in training data compared to low level implementations. It also drastically reduces number of tokens, and that has downstream effect of better utilization of context window and whatnot. We are not yet at the point where AI can use low-level code as building snippets the same way it can use high-level libraries; most likely we won't be for a long time.
- raincole 12d agoI've never encountered a case where I tell AI just uses plain JavaScript instead of React and it doesn't result in much cleaner code.
- skydhash 12d agoHave you tried using it in the case where React is actually a good help (very interactive apps)? And try to generate vanilla code for that as well?
- ordersofmag 12d agoIf what you're trying to build is a perfect match for the full set of abstractions React provides then it's gonna be cleaner to use React than have AI re-invent it. But most cases I run into don't fit that description.
- Xirdus 11d agoNote that even "plain" JavaScript is very high-level with tons of abstractions. Most website features are one-liners that call into browser APIs where the actual implementation lives.