3 ms·
> a change in the indentation used in our bundle files (4 spaces -> 2 spaces) I find it interesting that one of the reasons given for the reduction in package
by MitchellCash 4y ago
> a change in the indentation used in our bundle files (4 spaces -> 2 spaces)
I find it interesting that one of the reasons given for the reduction in package size is due to such a simple indentation change from 4 spaces to 2 spaces.
Not interesting that 2 bytes are less than 4 bytes, rather, TypeScript is a large project and it would be interesting to know how much size was saved from this one specific change? Seems like a trivial change, so why not do it sooner? And assuming readability isn't required in the bundle output why not bundle with no indentation at all and put everything on a single line, would this not be even smaller again?
- RyanCavanaugh 4y ago> Seems like a trivial change, so why not do it sooner? Re: indentation: Literally, no one thought of it, as far as anyone can tell. Linus's law appears to have its limits.
- robertlagrant 4y agoMost minifiers already put things on one line, though.
- jakebailey 4y agoTS has some unique restrictions due to downstream patching of our package; my PR description briefly talks about this as something we can try to improve in the future. Minification absolutely would save a lot more size out of our package, but I was not willing to change that in this PR.
- IshKebab 4y agoKind of funny because one of the benefits of tabs vs spaces that people laugh off is that it saves space. I think it's probably correct to laugh this off though. Why would you care about the non-minified/gzipped size this much?
- yrgulation 4y agoTS devs still debating this in 2022? And i thought php devs are ridiculous for still debating setters and getters.
- IshKebab 4y agoThey aren't debating it. And I don't think why you'd think setters and getters are not worth debating. There are significant downsides to them (e.g. they make Dart's sound nullable support more annoying).