Meanwhile Rust: "Ara ara~ what a naughty programmer. No, that's not how you do it, you've already eaten that variable so you can't use it anymore you bad boy~. See, you ate it on this line here *draws elaborate ASCII art*, and you tried to call a method here *another ASCII art*. And you also forgot to unpack that Result, mou~, at least unwrap it so you know if it worked or not..."
Rust usage jump to 200% of market. R34 of Yuri cargo-chan x borrow-chan went through the roof. Women with bases in Rust are paid handsomely for giving courses while cosplaying. The degenerate level of the world go up one whole level, and the bonk army could do nothing.
It doesn't really matter since your code is completely broken. It only checks if the number given contains even digits, not if the number itself is even. Try this:
Because it’s terribly inefficient, the JS code doesn’t actually work, since it only returns "false", and it’s not missing a brace, it has one too many…
86
u/larvyde Nov 20 '23
Meanwhile Rust: "Ara ara~ what a naughty programmer. No, that's not how you do it, you've already eaten that variable so you can't use it anymore you bad boy~. See, you ate it on this line here *draws elaborate ASCII art*, and you tried to call a method here *another ASCII art*. And you also forgot to unpack that Result, mou~, at least unwrap it so you know if it worked or not..."
15
u/Gnonpi Nov 20 '23
Python error messages have improved a lot recently, now KeyError can even tell you at what point in a nested structure you messed up, it's nice
16
u/Haringat Nov 20 '23
It doesn't really matter since your code is completely broken. It only checks if the number given contains even digits, not if the number itself is even. Try this:
4
u/Ali___ve Nov 22 '23
The JS is incredibly hard to read, overcomplicated, and doesn't even work.
3
u/SAiMRoX Nov 20 '23
Is that your code OP?
Because it’s terribly inefficient, the JS code doesn’t actually work, since it only returns "false", and it’s not missing a brace, it has one too many…
1
u/ahrye_ Nov 22 '23
When I was leaning c++, error log has been a nightmare to me
1
u/[deleted] Nov 20 '23
The trick for brace matching is to use the C-style of newline braces. It looks gimpy af but youll never not know what brace line you’re on
1
u/ferriematthew Nov 21 '23
I see where the missing parentheses is. It's after the (char) symbol. You never closed that function call.
1
u/j0nascode Jan 15 '24
Would be way cooler if Python would just fix the indentation for you.