Hacker News new | ask | show | jobs
by gst 4584 days ago
Actually you could. Just limit the max. number of instructions that are allowed to be executed in order for a script to be valid.
1 comments

Indeed, you can, but then you have a very exact requirement on exactly how the interpreter is implemented which can never be optimized, and any disagreement between implementations can cause a world ending consensus failure.

By not having looping or recursion script naturally gets an operation limit by virtue of having a size limit, and this is _relatively_ easy to get right between implementations. (Though, so far several of the alt implementations have gotten it wrong).