4 ms·
> - The type system is really, really flexible. It seems possible to specify the exact degree of safety that you want for any given situation. I never feel boun
by dtech 5y ago
> - The type system is really, really flexible. It seems possible to specify the exact degree of safety that you want for any given situation. I never feel bound by the type system. It's very liberating. Not so with Java or C#.
Personally this is why I believe all languages will converge into the structural, gradual typing model of Typescript.
- mrkeen 5y agoAs a hardcore fan of static typing, how would you convince me to use a gradual typing model?
- drost 5y agoGradual typing gives you the option. You can be as statically typed as you want. Dart is gradually typed. So when I'm writing some flutter code, I may not know when types I need in the moment, I can omit type signatures until I work that out then write my types and go back to update the code.
- dmitryminkovsky 5y agoI wouldn’t. My experience with Flow and Typescript is that the incremental adoption bit is misleading. It’s a hook. It’s possible, but you’ll quickly come to resent your JS code and go all in. That process will get you through most of the learning curve and that’ll be that.
- runninglate 5y agoHow do you type something like the groupBy function in TS?
- dtech 5y agoWhich language do you work in? I can promise you that Typescript can type things way more strictly than your language, unless it's Julia. Typescript allows you to not make typing very strict when it's not important, but also allows you to define things stricter than your average Haskell codebase. Most other languages have only 1 option about how strict a piece of code is typed.
- mrkeen 5y agoMy situation is: I statically know the types of things at compile time. I'm not sure how to 'define things stricter than that'. My question was: what benefits would I get from sometimes not knowing the types at compile time (which is what I guess gradual typing is)?