4 ms·
Why does const irk you? const sounds a lot clearer than con. Is that your primary criteria for picking a language? ;)
by amalantony06 5y ago
Why does const irk you? const sounds a lot clearer than con. Is that your primary criteria for picking a language? ;)
- mg 5y agoI 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/cae635054e17a6f107a39d328649137b83f25972/packages/react-fs/src/ReactFilesystem.js#L226 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.
- jazzyjackson 5y agoAs 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.
- deleted 5y ago[deleted]
- CRConrad 5y agocon map = ... let rec = ...