Hacker News new | past | comments | ask | show | jobs | submit login

> (iterate through an array = OK; unbounded recursion = not OK)...

Right, so all we need to do is solve the halting problem... <smirk>




Yeah, so some syntactic rules (using Array.forEach() instead of for(;;) loops) and prohibiting some of Javascript's more dynamic features might be enough to render the language non-Turing complete. It would also -- and this is kind of the point -- render the language unable to perform certain computations that plain vanilla Javascript can perform.


The halting problem is about the general case, but when deciding a sane subset of JS, one can always be more conservative.


Yeah, if your subset of JavaScript is not Turing complete.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: