5 ms·
There's often real tradeoffs between explicitness and readability, but yeah, I don't think semicolons are one of them. By definition they're completely out of t
by BigJono 4y ago
There's often real tradeoffs between explicitness and readability, but yeah, I don't think semicolons are one of them. By definition they're completely out of the way (at the end of statements).
I have the same problem with JS devs removing file extensions on imports. You're just removing useful information from the code, that's sitting in the most out of the way place in the file (right at the top before anything is even happening), for absolutely no good reason. And replacing it with build time magic in some 3rd party tool. That's such a terrible tradeoff it's almost unfathomable to me that an experienced programmer would willingly make it, let alone double down and argue for it if the topic is brought up.
You even get the same ridiculous post-hoc justifications for it too. "Oh but what if I want to change a JS file to a JSON file? I'd have to change the extension!".
- deleted 4y ago[deleted]
- rtpg 4y agoUnfortunately file extension removals gets into another weird space, where Typescript (well, `tsc`) won't rewrite your extensions, so if you add them you have to write "foo.js" even though the source file is "foo.ts" (at least in ES modules). This gets solved by using some sort of packager, but it's another sort of bit of ugliness that doesn't feel like it's going to get resolved anytime soon.