irelephant 🍭@lemm.ee to Programmer Humor@programming.devEnglish · 17 days agolooks good to melemm.eeimagemessage-square43fedilinkarrow-up1735
arrow-up1735imagelooks good to melemm.eeirelephant 🍭@lemm.ee to Programmer Humor@programming.devEnglish · 17 days agomessage-square43fedilink
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up14·edit-217 days 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-up7·17 days agoSo basically the same as a discard in C#?
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up1·edit-217 days 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.