Re:First look: adding type annotations to JavaScript
by frosted-flakes on Thursday March 10, 2022 @10:39AM
(#30628107)
Why do you think it would slow down development? Serious question.
[ Parent
| on HN ]
Re:First look: adding type annotations to JavaScript
by Turing_Machine on Thursday March 10, 2022 @01:09PM
(#30630254)
Those type annotations don't just magically appear. You have to write them.
Yeah, they're optional, but if you don't write them, there's no point in using TypeScript in the first place.
Re:First look: adding type annotations to JavaScript
by jeremyjh on Thursday March 10, 2022 @01:15PM
(#30630332)
Types are inferred even when you don't specify them; if you are using a library that has type specifications a lot of your code is going to be well-typed just as a consequence of using that library.
Re:First look: adding type annotations to JavaScript
by Turing_Machine on Friday March 11, 2022 @04:05PM
(#30646008)
1) "Someone else wrote them" doesn't make them free. Given a limited amount of developer time, that means that the time spent on the annotations wasn't spent on other functionality.
2) If the types can be inferred, that should just happen. No objection there. But this piece is specifically about "adding (manually-authored) type annotations to JavaScript"