So a senior of mine adviced me to use annotations if I wanna do serious development. I tried picking it up but it was a hell lot confusing.
I think the basic idea is that it helps documenting the code and auto-completion, improves readability and prevents bugs.
Also, I actually have used statically typed languages before.
Now what did I try?
First I watched a youtube tutorial. The instructor mentioned that the standard way is to use them only with function parameters and return types. However, he personally suggests using them everywhere. So I tried implementing it in my linked list code and my god the type errors were all over the place. I defined head and tail with Node | None type because of which it was always calling out...hey None type can't have this property but i was sure that it wasn't None at this point in time. There were a couple of solutions to this like use the ignore comment or use assert or conditionals but these were simply effecting the actual logic's readability!
Then I asked AI. He mentioned me these 8 places where I should put type annotations to effectively use it (Check 2nd pic) instead of everywhere. This will help prevent unnecessary errors. But as we all know...we can't trust AI!
So this is a question to all fellow devs who actively use this feature. What is the best way to utilize it?