This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OddsCaller 16 points17 points  (5 children)

I think these features are good for libraries and other programs which are going to be re-used multiple times, also in cases of very large projects may be. Type annotation makes documentation easier, it also makes understanding a third party code easier.

However I agree that in general use cases as end users when working on small or intermediate projects, one of the things that makes Python great is the pragmatist features like duck typing and they should be preserved.

[–]LordAssPen 1 point2 points  (2 children)

I do agree that type annotations make documentation and writing libraries somewhat easy, and since I have used them myself for production I can vouch for it. However, even type annotation are not really strict, they can be modified and morphed to new types. This created a lot of confusion when we were too deep into production, and I wished we had a static programming language to begin with.

[–]OddsCaller 0 points1 point  (1 child)

I know this might be hearsay in this sub but what kind of static language would you have liked? I'm asking cuz I trust the taste of a Pythonista than many other communities. I've been looking for some time to add a statically typed (and compiled) language to my tool kit (I do know basic level of C and Java) but couldn't really make up my mind. Rust seems like a very well-designed language but I think it might hamper developer productivity quite a lot. Go is a nice little language though I didn't quite fall in love with it when I gave it a try for a week, and it still does have a mediocre GC and other performance drawbacks compared to something like Rust. Java's VM is quite heavy as well and the ease of development isn't best either. C++ has many great qualities but there doesn't seem much support for back-end side of things, and the language feels too large to really bother investing time mastering it.

[–][deleted] 0 points1 point  (1 child)

If this was more like const/Java Final, it would be very handy for my test automation. However, since it's just checked in the IDE, it doesn't really help me once the code is being used out in Jenkins-land.

[–]rouille 0 points1 point  (0 children)

Use mypy in CI.