Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> if it is not, then you also have write extra code

In any language, not just Python. A type that isn't already built-in has to be defined in your code no matter what language you are using.

> I hope you agree with me that this isn't a great idea in any language.

Of course it isn't. Different types exist for good reasons.

> I also have the feeling that you might change your mind if you try out a modern fully fledged IDE with a good statically typed language.

I doubt you would have this feeling if you knew how many times I have tried "a modern fully fledged IDE with a good statically typed language". And every time has ended up the same.

> IDEs like IntelliJ can be configured to show all (or only certain) types that are not written in text but that the compiler infers

This is a fair point, but in a language like Python this could be provided as a library function if it were needed. (Python already has the "help" built-in function that shows you the documentation for whatever object you pass it as an argument, at the Python interactive prompt. Inferred types could be handled the same way if Python had them.)

> at least you often have a "basic" documentation through the types

Which might be significant useful information. Or it might not. It depends on what kind of code you are dealing with. It's quite possible that the particular kind of code I have dealt with has simply not been the kind where static typing is much of a help, and that there are other kinds of code where it is. But the original claim that I responded to was "Everyone needs types" (by which was meant "everyone needs static typing"). It is that blanket, general claim that static typing is always better that I was disputing, not the claim that static typing can be helpful in some cases.



> In any language, not just Python. A type that isn't already built-in has to be defined in your code no matter what language you are using.

Yeah exactly! So it's the same for every language. I just don't understand why you then say that I would have to type more in a statically typed language.

> I doubt you would have this feeling if you knew how many times I have tried "a modern fully fledged IDE with a good statically typed language". And every time has ended up the same.

Everyone is different and that's one reason why people choose different tools and languages. Nothing wrong with this - one of the best developers that I know uses vim for everything. I on the other hand would not be productive without a good IDE.

> But the original claim that I responded to was "Everyone needs types" (by which was meant "everyone needs static typing"). It is that blanket, general claim that static typing is always better that I was disputing

Fair enough, I agree with you on that one. The thing I disagree with is that is static typing requires (always) more effort when writing code. For Java this is totally true, but for many other languages, my experience is that I neither have to type more nor that I have to think more.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: