Opposition to Python type hints
Opposition to Python type hints
Posted May 7, 2015 16:08 UTC (Thu) by ibukanov (subscriber, #3942)In reply to: Opposition to Python type hints by niner
Parent article: Opposition to Python type hints
Both Perl and JavaScript even in the strict modes check names for existence only at runtime when the name is accessed or assigned. What I want is to check variable names and ideally property/methods for existence before the execution. At least modern Perl with -w warns about name used only once, but that is not helpful when after refactoring a wrong name is left in several places on rarely accessed branches.
Note that to check for property/method existence one does not need a full-fledged static typesystem. With JavaScript tools like jslint or similar that checks property/methods against a predefined list are enough to capture most of my typos.
