Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I'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.


If 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.


Have 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?


Note 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.




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

Search: