irelephant [he/him]🍭 to Programmer Humor@programming.devEnglish • 4 months agolooks good to melemm.eeimagemessage-square46fedilinkarrow-up11arrow-down10cross-posted to: programmerhumor@lemmy.ml
arrow-up11arrow-down1imagelooks good to melemm.eeirelephant [he/him]🍭 to Programmer Humor@programming.devEnglish • 4 months agomessage-square46fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-square@FooBarrington@lemmy.worldlinkfedilink0•4 months agotry { operation(); } catch { // nice weather, eh? }
minus-squareKaryoplasmalinkfedilink0•edit-24 months agoStarting 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
minus-squareTraister101linkfedilink0•4 months agoIf your joking yes, if your not Java and Java Script are seperate things.
minus-square@JustAnotherKay@lemmy.worldlinkfedilink0•4 months agoActually made this mistake in front of 20 people the other day. Guy at my job mentioned coding in java and I asked if he was doing web dev 🤦
minus-square@BangersAndMash@lemmy.worldlinkfedilink0•edit-24 months agoPlenty of java back end web development, so maybe not as embarrassing as you felt?
minus-square@jubilationtcornpone@sh.itjust.workslinkfedilinkEnglish0•4 months agoSo basically the same as a discard in C#?
minus-squareKaryoplasmalinkfedilink0•edit-24 months agoYeah, Python has it as well. I think the only real use of it is code readability since you declare that this variable will never be used.
minus-square@lengau@midwest.sociallinkfedilink0•4 months agowith contextlib.suppress(BaseException): do_thing()
try { operation(); } catch { // nice weather, eh? }
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
Same thing right?
If your joking yes, if your not Java and Java Script are seperate things.
Actually made this mistake in front of 20 people the other day. Guy at my job mentioned coding in java and I asked if he was doing web dev 🤦
Plenty of java back end web development, so maybe not as embarrassing as you felt?
His joking?
So basically the same as a discard in C#?
Yeah, Python has it as well. I think the only real use of it is code readability since you declare that this variable will never be used.
☑️ PR Approved
Thanks. I hate it.