3 ms·
Imo optional typing like this is the best trade-off for now. Usually, statically typed languages is not expressive. There are a lot of abstractions are hard to
by namelosw 7y ago
Imo optional typing like this is the best trade-off for now.
Usually, statically typed languages is not expressive. There are a lot of abstractions are hard to express in statically typed languages. Even in Haskell. With optional typing, you can express usual ideas with types, and cheat with 'any' when not applicable.
Another thing is the language itself can possibly execute without compile or even type check. Making developing feedback cycle much smoother when running tests or just save and refresh.
- 6gvONxR4sf7o 7y agoWhat's the difference between static typing with an Any type and optional typing?
- jesseschalken 7y agoAn "Any type" is optional typing if you don't need to downcast it in order to use it, like the "any" type in TypeScript and Flow. If the "Any" type is just a top type but you have to downcast it to use it, like in Kotlin, then it's not considered optional typing, since you still have to talk about types ;).
- 6gvONxR4sf7o 7y agoThat's very clear and interesting. Thanks :)