- cross-posted to:
- programmerhumor@lemmy.ml
- cross-posted to:
- programmerhumor@lemmy.ml
My eyes! My eyes!!!
My medication mostly.
This makes my deeply uncomfortable, like an itch I can’t quite scratch.
Hang on, this is just a C++ joke slapped onto Rust.
You could say they have rewritten the joke in Rust
rustfmt
is stopping me from writing code like this, and I have never been more happier using it after viewing this.
I’m going to write a tool that automatically adds the braces and semicolons to the column as you edit the code.
I will call it
rustfml
Crap, thats what I was thinking.
This is why python has to be putdown
I’m good at Python, and I don’t know Rust. This looks fine to me. I’ve fully missed the joke.
Same. Until you notice the column of curly braces and semi colons in the right margin.
Oh, so Rust is like JavaScript!
Lgtm ship it to prod
Lgtm? Let’s go to Madrid?
You never review code when you have no time to do an actual review? Looks good to me :)
You never review code when you have no time to do an actual review?
Nope. Then again, I never review code at all 🤷😁
I hate it with every fibre of my being but also secretly calmed by that column of statement terminators and brackets.
It’s like the code representation of the Vancouver riots kiss photo.
Then some jerk runs rustfmt and ruins all your hard work!
Can’t you fix the default format to this?
I’ll allow it!
Oh… Oh! Well, that is creative.
Sanity
I don’t know Rust. 🤷🏻♂️
(I mean, I don’t know a lot of Python either so I can’t even get the joke. 😞)
In Rust and lots of other languages you have to end each statement with a semicolon. The semi colon is usually placed right after the statement, but in this example there’s indentation after each statement before the semicolon so they’re all aligned.
There’s also the curly brackets, they’re padded in the same way, but those usually define where a scope (block) starts and ends making it even worse.
Look at the right side of the code editor
These scrollbars with issue indicators are becoming more and more fancy
lmao I didn’t even notice