Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 1 month agofunctionslemmy.mlimagemessage-square38linkfedilinkarrow-up1303arrow-down13 cross-posted to: programmer_humor@programming.dev
arrow-up1300arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@lemmy.ml · 1 month agomessage-square38linkfedilink cross-posted to: programmer_humor@programming.dev
minus-squaredavel@lemmy.mllinkfedilinkEnglisharrow-up13arrow-down1·1 month agoJavaScript can do better than that: () => {}
minus-squaredavel@lemmy.mllinkfedilinkEnglisharrow-up4·edit-21 month 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: []{}
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up2·1 month agoThe intention was to provide a longer version for the first step of the ladder.
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:
[]{}The intention was to provide a longer version for the first step of the ladder.