
24 Mar
2009
24 Mar
'09
12:21 a.m.
I'm a beginner just learning about type inference (through getting lots of error messages and using :t a lot). I find it fascinating, and it seems a shame to disregard this power by declaring all types. However I realize that it's the more global or critical types that should be declared, and more local areas can be left to inference. Perhaps also the compiler's ability to infer is related to its ability to detect compile-time type errors. In other words, if you program a compiler to be sensitive enough to detect all type errors at compile time, then by necessity you are giving it the smarts to infer types. Is that right? Thanks, Mike