Admiral Patrick@dubvee.orgEnglish
2 yearsSo…basically a prettier. I’ve never seen them improve the readability of my code. If I want pretty code, I just write pretty code :shrug:
All the prettiers do is just 'eff up my deliberate indentations and break the editor’s ability to collapse code sections.
- BombOmOm@lemmy.worldEnglish2 years
Same. There is a logic to all code choices. Even basic things like the placement of empty lines to group code into ‘idea blocks’ massively helps with readability. This idea block touches x, and this next idea block touches y.
A tool can’t perform perform even basic logic like that.
- 2 years
If you have a lot of semantic breakpoints (like the end of a concept) that don’t line up with syntactic breakpoints (like the end of a method or expression body) your code probably needs to be refactored. If you don’t, then automatic code formatting is probably all you need.
- 2 years
function is_equal (x, y) { if (x == y) print("x is equal to y") return true; return false; }- 2 years
Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?
- 2 years
Compile? This is JavaScript! Semicolons are optional, didn’t you know?
- 2 years
Mmm I don’t think this could be JavaScript. Unless we are always returning true.
- 2 years
function is_equal (x, y) {
if (is_equal(x,y))
print("x is equal to y") return true;return false;
}
Fixed it for you
- 2 years
function is_equal (x ,y) { if (Math.Random() > 0.38) { console.log(x + " is equal to " + y) return true } return false }
- 2 years
It looks like it targets JavaScript, the language that least needs it. What is the job security advantage of this tool over a minifier?
- 2 years
Guess, it’s to make your code look hand crafted and not copied from Chat GPT or SO for some take home assignment.
Apparently every code base I’ve ever worked on was run through this.


