Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 5 months agofunctionslemmy.mlimagemessage-square17linkfedilinkarrow-up19arrow-down10
arrow-up19arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@lemmy.ml · 5 months agomessage-square17linkfedilink
minus-squaredavel@lemmy.mllinkfedilinkEnglisharrow-up0·5 months agoJavaScript can do better than that: () => {}
minus-squaredavel@lemmy.mllinkfedilinkEnglisharrow-up1·5 months agoHuh, I haven’t looked at C++ in decades, and I didn’t know they’d added lambda functions/expressions, in C++11. Apparently you can shorten it further: []{}
function() {}JavaScript can do better than that:
C++:
[](){}Huh, I haven’t looked at C++ in decades, and I didn’t know they’d added lambda functions/expressions, in C++11. Apparently you can shorten it further:
[]{}