Re:V8 release v6.8
by pjmlp on Thursday June 21, 2018 @07:58AM
(#17364281)
Besides what WebAssembly offers as general purpose VM, in an ideal world TypeScript would take JavaScript's place.
[ Parent
| on HN ]
Why would it do that? Javascript is more appropriate in the early stages of a project. You don't want to go to the trouble of declaring types everywhere only to realize everything has to change. Once you stabilize you can add in typescript, which is the great thing about it.
Re:V8 release v6.8
by lucian1900 on Thursday June 21, 2018 @09:47AM
(#17365009)
It is precisely when you want to change everything that types are useful, because the compiler will helpfully point you to all cases that you forgot to change.
Re:V8 release v6.8
by phillipburch on Thursday June 21, 2018 @08:42AM
(#17364539)
No matter what stage of the project, you're implicitly writing code to a specific type whether you know it or not. Typescript just makes types explicit, and makes clear all the places you've made type assumptions. So if you need to change types later in the project, you can do so with confidence knowing that you've handled all the cases you made type assumptions.