Cipherd to Programmer Humor@lemmy.ml • 4 months agofunctionslemmy.mlimagemessage-square36fedilinkarrow-up1293arrow-down15
arrow-up1288arrow-down1imagefunctionslemmy.mlCipherd to Programmer Humor@lemmy.ml • 4 months agomessage-square36fedilink
minus-squaredavel [he/him]linkfedilinkEnglish13•4 months agoJavaScript can do better than that: () => {}
minus-squaredavel [he/him]linkfedilinkEnglish5•edit-24 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: []{}
minus-square@bleistift2@sopuli.xyzlinkfedilinkEnglish1•4 months 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.