this post was submitted on 17 Jan 2025
332 points (98.5% liked)

Programmer Humor

19987 readers
1493 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Karyoplasma@discuss.tchncs.de 45 points 6 hours ago (1 children)
[–] FooBarrington@lemmy.world 33 points 5 hours ago (2 children)
try {
    operation();
} catch {
    // nice weather, eh?
}
[–] Karyoplasma@discuss.tchncs.de 4 points 4 hours ago* (last edited 3 hours ago) (1 children)

Starting with Java 21 (I think), they've introduced ignored variables, so you can now actually do this:

try {
    operation();
} catch (Exception _) {
    // nice weather, eh?
}

Edit: forgot that this is about JS lel

[–] __ghost__@lemmy.ml 1 points 2 hours ago (1 children)
[–] Traister101@lemmy.today 1 points 1 hour ago

If your joking yes, if your not Java and Java Script are seperate things.

[–] MajorHavoc@programming.dev 1 points 2 hours ago

Thanks. I hate it.