3 ms·
That's not a given, think typescript compiling to minified javascript. Some compilers like coffeescript do put in some effort to have the output be readable but
by ketralnis 5y ago
That's not a given, think typescript compiling to minified javascript. Some compilers like coffeescript do put in some effort to have the output be readable but I wouldn't assert that it should be a goal for everyone
- eyelidlessness 5y ago> typescript compiling to minified javascript This is an odd example. TypeScript compiles to readable JavaScript for nearly everything except the odd runtime behavior (eg enums) and “downleveling”, which is increasingly unnecessary. Minification is still a separate step AFAIK (if you’re using tsc; obviously ESBuild and SWC are another story, as will be Bun).
- ketralnis 5y agoYou caught me, I've never written typescript. I don't think that changes my claim though
- eyelidlessness 5y agoI think I have varying and stronger feelings about it depending on context. Personally if I were to use this or any compile-to-shell thing, I’d probably prefer it produces unreadable output. I don’t want to ever read bash if I can help it. If I have to, it’s a good sign I’m already beyond my preferred scope for using bash in any way. Whereas if I’m compiling TypeScript/CoffeeScript/anything to JS, it’s pretty likely I already have JS as a built in constraint and I probably want to be able to read the output so I can debug it.