Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 7 days agofunctionslemmy.mlimagemessage-square32linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@lemmy.ml · 7 days agomessage-square32linkfedilink
minus-squaredavel [he/him]@lemmy.mllinkfedilinkEnglisharrow-up0·7 days agoJavaScript can do better than that: () => {}
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up0·7 days agoThe intention was to provide a longer version for the first step of the ladder.
minus-squaredavel [he/him]@lemmy.mllinkfedilinkEnglisharrow-up0·7 days 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:
The intention was to provide a longer version for the first step of the ladder.
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:
[]{}