Philippe Fremy <[EMAIL PROTECTED]> writes:
I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without any kind of variable declaration. This would definitely brings a lot of power to python.
You know, I've always thought that ML-style type inference is an impressive technical feat, but why is it so important to not use declarations? This is an aspect I've never really understood.
You know, I think I agree ;-). Just because you don't declare the types, doesn't mean you can change the implicit type willy nilly anyway; at least for more complex programs anyway. In fact, it would be safer to have type checking when you want to do something like this. I currently needed to change a number parameter to a string parameter (found out order_no wasn't just numbers as specs had specified). Of course this parameter was being used in a great many places. Changing it was a bit scary because we had to make sure it wasn't being treated as a number anywhere throughout the code. Yes good coverage with unit tests would have helped but unfortunately we do not yet have good coverage. TDD is a quite hard to practice as a beginner.
Cheers,
Huy -- http://mail.python.org/mailman/listinfo/python-list