Cipherd@lemmy.ml to Programmer Humor@lemmy.ml · 7 months agofunctionslemmy.mlimagemessage-square9fedilinkarrow-up11arrow-down10 cross-posted to: [email protected]
arrow-up11arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@lemmy.ml · 7 months agomessage-square9fedilink cross-posted to: [email protected]
minus-squaredavel@lemmy.mllinkfedilinkEnglisharrow-up0·7 months agoJavaScript can do better than that: () => {}
minus-squaredavel@lemmy.mllinkfedilinkEnglisharrow-up0·edit-27 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: []{}
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:
[]{}