Talk:Evaluate binomial coefficients: Difference between revisions

Line 143:
:: 2) Does throw compiler errors if the hints themselves are syntactically ill-formed, as they were in Donald's second draft.
 
: My personal verdict is that in languages like Idris, Agda, Haskell, where the compiler does use the type signatures, they are excellent and indispensable, but that in Python3, which doesn't yet use them, they are (at the scale of Rosetta Code examples) a nice idea, but no more in practice than a source of additional bugs, and, if used in place of type comments, just make things less clear and more difficult for the reader.
: Even Donald was clearly confused by them, assigning wrong types, and inadvertently introducing in what he presumably hoped to be an 'improvement', both compiler and mypy errors ...
: On the scale of much larger projects, and as a complement to comments, rather than a substitute for them, the use of the '''mypy''' and the type hints which it can read, will doubtless begin to pay off the cost of the expanded bug surface which it initially introduces.
 
: NiceFor the small scale of Rosetta Code examples however - nice idea, but perhaps doesn't yet survive experiment, or actually benefit RC readers ? Maybe when Python4 comes ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 08:55, 24 February 2019 (UTC)
 
:: Donald [[User:Paddy3118|Paddy3118]]. Do feel free to introduce type hints into your own code - but please desist from deleting my type comments and replacing them with these hints. They damage the legibility of the code, demonstrably expand the surface for bugs, and in Python3, offer no benefit whatsoever to the compiler [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 09:02, 24 February 2019 (UTC)
9,655

edits