in reply to Re^5: use Ensure -- module to spot undefined stuff
in thread use Ensure -- module to spot undefined stuff

I don't think that a dynamic language has to be an unnecessarily dangerous one.

Accepting that AUTOLOAD etc. are extremely useful, does one really have to accept run-time errors with simple subroutines, when a small amount of extra checking could pick up the error at compile-time ?

I think the answer is no. But it's not free: it requires the programmer to declare subroutines which aren't going to be defined at compile time. This doesn't prevent the use of the dangerous stuff, it just makes it explicit. (The Ensure module uses no Ensure for the required declaration.)

It's hard to argue against perfection in testing. However, I'd still rather have the compilation system spot the obvious errors for me -- so I can concentrate on the really hard stuff.