Bullocks. I wrote thousands if not hundred thousandths lines of untyped Python code in over 15 years, for critical systems and thousands of users. It works for me. I'm not confused about the code, I can code and debug quicker than many of my typed-language colleagues and even now that python supports type hints I often only use them in bigger projects or in places where they're actually convenient. It's simply the wa…
The fact that people can get used to something and be productive with it doesn't mean that its not objectively worse than the alternative.
Type Inference Was a Mistake
41–50 of 133 posts
Re: Type Inference Was a Mistake
#42Explicit typing is great until your code is littered with shared_ptr >>> everywhere.
Re: Type Inference Was a Mistake
#43Earlier quoted context omitted.
It's not even factual. > In Rust and Haskell you have to at least annotate the parameter types and return type of functions. Type inference is only for variable bindings inside the function body. This is false for Haskell. Can't speak for Rust.
Rust does require explicitly writing out the signature of top-level functions. I believe it was a conscious decision to limit de cascading of type errors from global type inference, the base algorithm was capable of it.
Re: Type Inference Was a Mistake
#44Bullocks. I wrote thousands if not hundred thousandths lines of untyped Python code in over 15 years, for critical systems and thousands of users. It works for me. I'm not confused about the code, I can code and debug quicker than many of my typed-language colleagues and even now that python supports type hints I often only use them in bigger projects or in places where they're actually convenient. It's simply the wa…
The fact that people can get used to something and be productive with it doesn't mean that its not objectively worse than the alternative.
Re: Type Inference Was a Mistake
#45This way you can read the code more easily and if you want to see the type it's there for you.
Re: Type Inference Was a Mistake
#46Re: Type Inference Was a Mistake
#47Explicit typing is great until your code is littered with shared_ptr >>> everywhere.
If you're using a type like that repeatedly then it probably deserves an alias.
Re: Type Inference Was a Mistake
#48This is not good. One of the author's arguments is that type inference in an IDE is bad because sometimes I read code in a book where I don't have type inference... I don't know about other folks, but the vast majority of code I read is in my editor, where the type inference saves me a ton of time and pain.
Seriously, that argument is like saying that long variable names are bad because sometimes you have to write code on punched cards. The solution to the drawbacks of obsolete technology is to not use obsolete technology.
Re: Type Inference Was a Mistake
#49He posts this on HN, which happens to be built in Arc Scheme, a Lisp dialect (which is dynamically typed). I wonder if the author has written software that has better uptime and more popularity than HN? Is the author's codebase truly easier to understand?
Re: Type Inference Was a Mistake
#50Bullocks. I wrote thousands if not hundred thousandths lines of untyped Python code in over 15 years, for critical systems and thousands of users. It works for me. I'm not confused about the code, I can code and debug quicker than many of my typed-language colleagues and even now that python supports type hints I often only use them in bigger projects or in places where they're actually convenient. It's simply the wa…
The fact that people can get used to something and be productive with it doesn't mean that its not objectively worse than the alternative.
A bicycle is objectively worse if you have many staircases to deal with, but that doesn't imply that getting used to one and being productive with it is fundamentally and necessarily misguided.