Definitely a reasonable thing to consider and this is the direction I would like to see programming languages evolve towards in the AI era.
Move errors from runtime to compile time as much as possible.