Comment by mg

4 years ago

I think it has three reasons:

The more often a construct is used in a language, the shorter I like it to be.

It groups variable definitions mentally by having them all the same length if they are "var", "let" and "con".

It would often make the code look more uniform which is more beautiful in my eyes. Example:

https://github.com/facebook/react/blob/cae635054e17a6f107a39...

I would prefer the lines 226 and 227 to start with "con" and "let". It would make the code visually more appealing to me.

As far as code being visually appealing, for me those two lines are the least of that code’s troubles.

I’m sympathetic to wanting code to have good aesthetics. If I was writing those lines I probably would have daydreamed for 5 minutes thinking of new names for map and record so that the equal signs would line up.