Re:Design Doc: Use JavaScript instead of TypeScript for inte...
by smichel17 on Tuesday June 09, 2020 @09:53AM
(#23466655)
Modules are my favorite part of js (and ts, mostly). One file = one module with all imports/exports explicit is so incredibly right. `git grep`ing to figure out which other file a random implicit import came from is a real PITA.
Re:Design Doc: Use JavaScript instead of TypeScript for inte...
by fardelian on Tuesday June 09, 2020 @05:09PM
(#23470939)
>I check types all over
Which is something you rarely need to spend time on if you're using TypeScript.
Re:Design Doc: Use JavaScript instead of TypeScript for inte...
by jeffmcmahan on Wednesday June 10, 2020 @11:53AM
(#23478500)
That's true. But with TS I have to declare types, import typings, maintain a build process to run the TS compiler, and so on. Moreover, static typing comes with added tediousness, and I personally feel that it's not worth the freight.
Modern static ESModule JS is quite good. I have several projects north of 30KSLOC written in modern JS. I'm not living in "undefined hell" because I use named-export ESModules, I check types all over, and I write quality tests. A little discipline goes a long way.