A language with your suggested restriction (and a few more) might be possible.
But it's not the only way to get a total language (that always halts), contrary to what your original comment claims.
But it's not the only way to get a total language (that always halts), contrary to what your original comment claims.
While statically verifying your snippet is possible, it is also significantly more difficult to do than enforcing rules like "all loops must have an upper limit". I also think that you'd need dependent types to make this approach viable. Your simple example is IMHO rather an exception, just having "unsigned int" parameters / return types would mostly not suffice to statically verify that a recursive method will finish or not. (plus things like global state etc.)