Earlier quoted context omitted.
There are some key things here that maybe weren't clearly stated in my writeup. Firstly, the old codebase is TS namespaces, which compile down to IIFEs that push properties onto objects. Each file that declares that namespace is its own IIFE, and so every access to other files incurs the overhead of a property access. With modules, tooling like esbuild, rollup, can now actually see those dependencies (now they are st…
Maybe they could update esbuild to be aware of TS namespaces instead?
PR that converts the TypeScript repo from namespaces to modules
121–130 of 204 posts
Re: PR that converts the TypeScript repo from namespaces to modules
#122Earlier quoted context omitted.
I can see this is probably a calm point that will definitely not escalate, programmers don't really care about tabs and spaces that much, right???
"Tabs vs spaces" is often misunderstood (and falsely reported) as a problem of preference. The real problem is that using spaces for indentation is an accessibility issue. The solution is to use tabs for indentation, and spaces for alignment.
int foobar(int a,
___________int b) // should only ever have spaces (using _ here because HTML)
But good luck finding an editor that won't insert a tab when you use the tab key here (willing to be wrong).
The other issue I have is that diffs break alignment between undented code and anything with tabs because the tabs "eat" the leading space, but unindented lines are offset by one.
Re: PR that converts the TypeScript repo from namespaces to modules
#123Earlier quoted context omitted.
> The real problem is that using spaces for indentation is an accessibility issue. Not this again https://github.com/prettier/prettier/issues/7475#issuecommen... > Blind programmers have no problems with it.
Not everyone with vision or vision processing issues is blind. Being able to configure custom tab stops is an easy way to control what level of indentation is useful and clear.
Re: PR that converts the TypeScript repo from namespaces to modules
#124Earlier quoted context omitted.
> Why not save even more bytes and re-format the output to single tab indentation? For your answer search "programmers who use spaces make more money"
Correlation != causation Spaces are simply inferior to tabs since the latter conveys the meaning of "one level of indentation" while the former does not. It's also better for accessibility and file size. There is not one single logical reason to ever use spaces for indentation, not one. For some very fucking stupid historical reason someone in the 80s made the idiotic decision of spaces being the default in editors a…
Re: PR that converts the TypeScript repo from namespaces to modules
#125Earlier quoted context omitted.
"Tabs vs spaces" is often misunderstood (and falsely reported) as a problem of preference. The real problem is that using spaces for indentation is an accessibility issue. The solution is to use tabs for indentation, and spaces for alignment.
While that may be true, "spaces for alignment" is nigh unsupported by all editors I've seen. They insist on replacing 8 (or N) spaces with tab even if in an alignment region. int foobar(int a, ___________int b) // should only ever have spaces (using _ here because HTML) But good luck finding an editor that won't insert a tab when you use the tab key here (willing to be wrong). The other issue I have is that diffs bre…
I've had some editors that made tab-space conversion an option, but it was never mandatory.
Re: PR that converts the TypeScript repo from namespaces to modules
#126Earlier quoted context omitted.
> The real problem is that using spaces for indentation is an accessibility issue. Not this again https://github.com/prettier/prettier/issues/7475#issuecommen... > Blind programmers have no problems with it.
Not everyone with vision or vision processing issues is blind. Being able to configure custom tab stops is an easy way to control what level of indentation is useful and clear.
We're struggling with the wrong problem if we aren't asking why the editor can't treat blocks as entities that are displayed however we want.
Re: PR that converts the TypeScript repo from namespaces to modules
#127Earlier quoted context omitted.
Correlation != causation Spaces are simply inferior to tabs since the latter conveys the meaning of "one level of indentation" while the former does not. It's also better for accessibility and file size. There is not one single logical reason to ever use spaces for indentation, not one. For some very fucking stupid historical reason someone in the 80s made the idiotic decision of spaces being the default in editors a…
Tabs are denoted by arrows and I don't like being told what to do! :)
Re: PR that converts the TypeScript repo from namespaces to modules
#128Re: PR that converts the TypeScript repo from namespaces to modules
#129Earlier quoted context omitted.
That doesn't make sense that spaces vs tabs would result in a 2x longer checkout. Something else is at play if that is the case.
He did mention it was subversion
Re: PR that converts the TypeScript repo from namespaces to modules
#130Earlier quoted context omitted.
Correlation != causation Spaces are simply inferior to tabs since the latter conveys the meaning of "one level of indentation" while the former does not. It's also better for accessibility and file size. There is not one single logical reason to ever use spaces for indentation, not one. For some very fucking stupid historical reason someone in the 80s made the idiotic decision of spaces being the default in editors a…
Spaces define by themselves the spacing convention unambiguously, whereas tabs is environment dependent and need other tools like editorconfig to guarantee consistency