143
Is TypeScript a fad or is my manager delusional?
(feddit.dk)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Python also has a statically typed option these days.
Edit: Previously said "strongly" instead of "statically"
Which one? There is static typing with the
typing
module, but that's not strong.I should have said statically typed, fixed.
Ah, gotcha, thanks! I'd have loved a strongly-typed option.
The static typing system is slowly getting there, but many useful Python patterns can't be expressed yet. You can, for example, write a function that appends an item to a generic tuple - but you can't concatenate two tuples. I really hope they keep expanding on the system!
Isn’t Python already strongly typed?
No:
I haven’t used Python since around the time when type hints first became a thing so I might be completely wrong here, but isn’t this because Python just generally ignores type hints? If you ran a static type checker like mypy over this it would complain right?
Also, if you actually did anything with the list that you couldn’t do with a bool (e.g.
len(value)
), it would throw an error too because Python is actually pretty strict about types, just only at runtime. That’s why it’s usually considered to be strongly typed, although people don’t seem to agree what exactly that’s supposed to mean.