On 14-10-2016 1:07, pozz wrote:
> All the tricks have a common goal: to discover bugs as soon as possible,
> mostly during
> compilation process. Indeed I usually find some bugs during compilation (or
> analysis). It seems to me very important.
I wanted to reply a bit more to this paragraph as well.
I agree that finding bugs as soon as possible is nice, but the thing to keep in
that the kind of bugs you find during compilation are almost always syntactic
typos or other simple mistakes. I think semantic and logic errors are usually
that have the biggest impact and take by far the most time to debug and fix.
mostly cannot be detected by compilers anyway. A syntactically valid program
something completely bogus (and almost always does because humans make mistakes
designing and building it)
In my personal experience I find that I make a lot LESS syntactic errors and
mistakes in Python than in other languages. Mostly because Python produces very
and concise programs when compared to other languages (especially languages as
as C). A function of 30 lines in Python has a lot less chance to have a bug
equivalent function that requires 300 lines to write elsewhere.
Bottom line: >I< don't really need static compiler checks when working in
Python. I do
miss them sometimes when refactoring stuff, but that's where a solid unit test
comes to the rescue.