Re:TypeScript 3.6
by Ididntdothis on Wednesday August 28, 2019 @06:11PM
(#20824575)
I am also starting to embrace a mix. “Any” in TS or “dynamic” in C# can save a lot of code when parsing JSON but then I usually quickly try to move over into the typed world.
`unknown` is also a really convenient type too: https://www.typescriptlang.org/docs/handbook/release-notes/t...
I think of it as "I don't care what the type is, but I also shouldn't be able to do anything with it"
Exactly, I always found static typing to be annoying clutter and Python seemed to work even at scale. I removed the few type hints the codebase had.
Then I had to spend a year in C# professionally. At the end, I was fine with both, no preference. Then I jumped back into our Python and only then realized the utility of typing - it felt chaotic, my (IntelliJ) IDE was no longer helping me and every time I had Prod type related bug, it feeling dumb.
Ended up type hinting the critical parts of the Python.