Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · il y a 10 moisfunctionslemmy.mlimagemessage-square39linkfedilinkarrow-up1301arrow-down15
arrow-up1296arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@lemmy.ml · il y a 10 moismessage-square39linkfedilink
minus-squaredavel [he/him]@lemmy.mllinkfedilinkEnglisharrow-up14arrow-down1·il y a 10 moisJavaScript can do better than that: () => {}
minus-squaredavel [he/him]@lemmy.mllinkfedilinkEnglisharrow-up5·il y a 10 moisHuh, 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·il y a 10 moisThe intention was to provide a longer version for the first step of the ladder.
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:
[]{}The intention was to provide a longer version for the first step of the ladder.