6 ms·
Agreed. I'm past the "it's like writing pseudo-code - so cool!" honeymoon phase and onto the "some sort of static typing is actually pretty useful" as a develop
by jmt_ 4y ago
Agreed. I'm past the "it's like writing pseudo-code - so cool!" honeymoon phase and onto the "some sort of static typing is actually pretty useful" as a developer.
- aprdm 4y agoGood thing is that python3 provides typing.
- peterashford 4y agoOptional type hints are not the same at all.
- isitmadeofglass 4y agoNo, its better. You can build the code first, test that it functions as expected, then add types, then compile it. This is miles ahead of having to struggle with getting types correct in C++ before you even have anything resembling a workable solution.
- jmt_ 4y agoI don't disagree but I wish Python had builtin support for runtime type checking. I've thought about switching to Go or Rust for certain projects but Python's rich ecosystem makes it hard for me to switch, so for now I long for runtime type checking without needing an external library (e.g typeguard).
- meadsteve 4y agoVery much agree. It's one thing I really appreciated about how php added type annotations. You didn't need them but once you added them they became a gaurantee.
- aprdm 4y agoYou can configure vscode to fail on typing problems and it will show errors in your editor
- peterashford 4y agoSo that's an IDE feature rather than a language level feature
- isitmadeofglass 4y agoYou can check types at runtime in python. You can even check values at runtime. Heck you can check the weather at runtime if you like. What’s the problem exactly?
- ok_dad 4y agoI don’t get the struggle with types people have. It’s not hard to use a knife instead of a hammer to cut stuff. What’s the struggle with types, specifically?
- isitmadeofglass 4y agoTry teaching c++ to a new programmer and you’ll understand the struggles people have with types. You might have forgotten, but you had head scratchers too when you where learning. Everyone has them. I’ve taught people who are absolute geniuses, even they struggled initially. And sure you get over it, just like people can become quite adapt at programming in esoteric languages like brainfuck, but that doesn’t mean there aren’t any better ways.
- ok_dad 4y agoYea types are hard, but I think to write quality software types are really important, almost necessary. I guess starting in a foundation where types are minimal like Python would be good for learning, then adding static typing is just a level of abstraction above that. We have to learn programming gradually though abstractions anyways, so I don’t see a problem there.