|
You are only considering decent sized web development in your considerations. There are many more JS users out there. People doing shell scripting (the ZX folks dor example), people doing some data science, or who have a js engine embedded in their other project for scripting. Or hobbyists or small site operators. Or library authors! None of these people have the same complex pipeline you are assuming. They might never have to transpile at all, with these changes, might not need any build tools. The simple cases get orders of magnitudes simpler, and that counts for a lot. Making it so that the js runtime can handle modern code as it is authored- versus having to preprocess- would be a great relief to many. It would also help library authors, who are today tasked with authoring code in one style, and writing tools & config to allow type-users or regular users. The regular users, and often accidentaly typescript users, get code which has lots of additional processing they may or may not want, depending on what module outputs & setup the library author picked when they ran typescript. Ideally most of these decisions should be deferred as much as possible to the end, to the consumer, and with this proposal that becomes possible. Library authors could just release tbeir code as is, unmolested. That sounds like such a huge breath of fresh air, that allows just in time decision making at the end, versus forcing projects individually to tackle these questions & somehow work cohesively. Generally yeah, web projects will still want some processing, probably. There's probably a couple KB of code we could shave off, post-compression, and we (very arguably) should. But the overall toolchain complexity experienced by so so so many users, by library authors, by newcomers... it could be greatly greatly simplified, by not needing each library, each link in the chain, to have to face transpilation challenges. This vastly improves & simplifies the js universe. Software developmemt is bigger than industrial scale web development. This greatly eases the burden in many many many areas of JS dev. |
Even industrial scale web development still needs debug builds during development and the fastest debug build is "no build". Faster development builds lead to increased developer productivity if nothing else.
Also, don't underestimate the fact that type annotations generally compress extremely well. Type stripping certainly would shave a lot of kilos off uncompressed sizes, but it may be negligible to unimportant in gzip or Brotli real world conditions.