Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 2 days agofunctionslemmy.mlimagemessage-square31fedilinkarrow-up1257arrow-down12 cross-posted to: [email protected]
arrow-up1255arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@lemmy.ml · 2 days agomessage-square31fedilink cross-posted to: [email protected]
minus-squaredavel [he/him]@lemmy.mllinkfedilinkEnglisharrow-up13arrow-down1·1 day agoJavaScript can do better than that: () => {}
minus-squaredavel [he/him]@lemmy.mllinkfedilinkEnglisharrow-up4·edit-21 day 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 day 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.