Couldn’t that problem be solved with static typechecking?