HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-27 days agoWhy make it complicated?lemmy.mlimagemessage-square117fedilinkarrow-up1348arrow-down137file-textcross-posted to: [email protected]
arrow-up1311arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-27 days agomessage-square117fedilinkfile-textcross-posted to: [email protected]
minus-squarenebeker@programming.devlinkfedilinkEnglisharrow-up3·6 days agoAnd bow to the compiler’s whims? I think not! This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side.
minus-squareHaradion@lemmy.mllinkfedilinkarrow-up1·2 hours agoIf type constraints later in the function let the compiler infer the type, this syntax totally works.
And bow to the compiler’s whims? I think not!
This shouldn’t compile, because .into needs the type from the left side and let needs the type from the right side.
If type constraints later in the function let the compiler infer the type, this syntax totally works.