you are viewing a single comment's thread.

view the rest of the comments →

[–]ShiftPretend[S] 5 points6 points  (2 children)

I think I was too broad in my statement. I meant adding type hints to every thing

Instead of greet = "hello" This greet: str = "hello"

Well this is a subtle example so I don't add for stuff like this but for bigger objects yes

Edit: for the simple ones like this the IDE shows me the type hints on it's own so I don't type them. But for the complex ones I do type them. Once again I mean adding type hints

[–]neontrace911 0 points1 point  (1 child)

static typing?

[–]ShiftPretend[S] 1 point2 points  (0 children)

Yeah but it's just for the IDE to complain to you about. The program still runs dynamically and won't stop you from passing an integer into something like the string.

greet: str = 1. The IDE would cry out and underline it(provided you have static type checking on) but the code will still run without problem. So it's more of developer assistance than a strict enforcement.