learnbyexample@programming.dev to Linux@lemmy.mlEnglish · 1 month ago$HOME, Not So Sweet $HOMEgist.github.comexternal-linkmessage-square13fedilinkarrow-up12arrow-down10
arrow-up12arrow-down1external-link$HOME, Not So Sweet $HOMEgist.github.comlearnbyexample@programming.dev to Linux@lemmy.mlEnglish · 1 month agomessage-square13fedilink
minus-squareschnurrito@discuss.tchncs.delinkfedilinkarrow-up0·1 month agoTIL that you can declare return types this way in C++.
minus-squareqaz@lemmy.worldlinkfedilinkEnglisharrow-up0·1 month agoI never understood why they added that
minus-square_____@lemm.eelinkfedilinkEnglisharrow-up1·1 month agobecause explicitly declaring types can be redundant, if the compiler knows a lot of the times you should also know also because some types are extremely cursed: see std views/ranges
Looks like C++.
TIL that you can declare return types this way in C++.
I never understood why they added that
because explicitly declaring types can be redundant, if the compiler knows a lot of the times you should also know
also because some types are extremely cursed: see std views/ranges