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

A line of JS that has to run through the Javascript interpreter in your browser rather than a simple I/O operation?

If internally this gets optimized to a simple I/O operation (which it should) then why add the JS indirection in the first place?



> simple I/O operation

That’s the reason it doesn’t get implemented. Nobody wants the simple I/O operation based inclusion. The moment you try to propose it, there’ll be demands to add conditional logic or macros. More relevant for the web is instantiating html templates, which will undoubtedly get piled onto such a feature. And pretty soon you have yet another:

> interpreter in your browser

Might as well use the one already there.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: