Paul Rubin schrieb:
> It starts to look like sufficiently powerful static type systems are
> confusing enough, that programming with them is at least as bug-prone
> as imperative programming in dynamically typed languages.  The static
> type checker can spot type mismatches at compile time, but the
> types themselves are easier and easier to get wrong.

That's where type inference comes into play. Usually you don't write the 
types, the compiler infers them for you, so you don't get them wrong.

Occasionally, you still write down the types, if only for documentation 
purposes (the general advice is: do the type annotations for external 
interfaces, but not internally).

BTW if you get a type wrong, you'll be told by the compiler, so this is 
still less evil than bugs in the code that pop up during testing (and 
*far* less evil than bugs that pop up after roll-out).
And the general consensus among FPL programmers is that you get the hang 
of it fairly quickly (one poster mentioned "two to three months" - this 
doesn't seem to be slower than learning to interpret synax error 
messages, so it's OK considering it's an entirely new kind of diagnostics).

Regards,
Jo
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to