Re:Pyret – A language exploring scripting and functional pro...
by AstralStorm on Thursday December 15, 2016 @01:12PM
(#13186700)
Use IDE which runs type inference like the compiler when that's a problem. Can't do it in Python though.
Re:Pyret – A language exploring scripting and functional pro...
by skrishnamurthi on Thursday December 15, 2016 @07:22PM
(#13190015)
Programmers use a variety of editors these days. They often don't want to be locked down to one single IDE. So "let the IDE do it" is not a universally satisfying answer either.
You know n is a number and the result is a number. You don't need to "type check in your head".
Remember Pascal? Being explicit is good for education and for regular sanity.
P.D: I like python very much, but all the time I'm wondering "ok, what is the meaning of this code, let's find elsewhere so I can remember what is supposed this return"
This also happens to me with F# (type inference is weird: The compiler know, but it hide to me what it know!).