irelephant 🍭@lemm.ee to Programmer Humor@programming.devEnglish · 1 month agolooks good to melemm.eeimagemessage-square43fedilinkarrow-up1734cross-posted to: programmerhumor@lemmy.ml
arrow-up1734imagelooks good to melemm.eeirelephant 🍭@lemm.ee to Programmer Humor@programming.devEnglish · 1 month agomessage-square43fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up15·edit-21 month 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-squarejubilationtcornpone@sh.itjust.workslinkfedilinkEnglisharrow-up8·1 month agoSo basically the same as a discard in C#?
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up2·edit-21 month 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.
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
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.
Same thing right?