learnbyexample@programming.dev to Linux@lemmy.mlEnglish · 1 month ago$HOME, Not So Sweet $HOMEgist.github.comexternal-linkmessage-square10fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-link$HOME, Not So Sweet $HOMEgist.github.comlearnbyexample@programming.dev to Linux@lemmy.mlEnglish · 1 month agomessage-square10fedilink
minus-squareschnurrito@discuss.tchncs.delinkfedilinkarrow-up0·1 month ago auto main() -> int What programming language is this even?!
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-up0·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
What programming language is this even?!
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