It is often asserted that the halting problem is undecidable. And proving it is indeed trivial.
But that only applies to an arbitrary program.
Has there been any study regarding classes of programs humans usually make?
It can sometimes be easy to analyze a program and enumerate all of its degrees of freedom and conclude that it will halt.
For example, has there ever been an effort to create a programming language (scripting really) that guarantees halting? It would not be widely applicable but could still be useful for mission critical modules.
const
,final
,notnull
, etc. keywords to restrict your code. Restricted is good (for the particular tasks that can be implemented, of course). :-) $\endgroup$final
keyword slightly annoying because it did not prevent performing operations on that final object, which means that immutable data structures implemented as generic classes are only immutable if the inputs are themselves immutable. $\endgroup$