3 ms·
> (iterate through an array = OK; unbounded recursion = not OK)... Right, so all we need to do is solve the halting problem... <smirk>
by bigiain 6y ago
> (iterate through an array = OK; unbounded recursion = not OK)...
Right, so all we need to do is solve the halting problem... <smirk>
- userbinator 6y agoThe halting problem is about the general case, but when deciding a sane subset of JS, one can always be more conservative.
- saagarjha 6y agoYeah, if your subset of JavaScript is not Turing complete.
- kiwidrew 6y agoYeah, 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.