SuperFola to Programming LanguagesEnglish · 9 months agoType inference was a mistakeborretti.meexternal-linkmessage-square46fedilinkarrow-up169arrow-down111
arrow-up158arrow-down1external-linkType inference was a mistakeborretti.meSuperFola to Programming LanguagesEnglish · 9 months agomessage-square46fedilink
minus-squareGobbel2000linkfedilinkarrow-up40arrow-down1·9 months agoI’m just glad that type inference can improve this sort of situation a bit: ConfigManager configManager = new ConfigManager();
minus-squarechellomere@lemmy.worldlinkfedilinkarrow-up2arrow-down7·9 months agoWhy not just use auto (assuming C++) or var (assuming C#/Java)?
minus-squareJakenVeina@lemm.eelinkfedilinkEnglisharrow-up38·edit-29 months agoBecause that’s type inference. The exact thing the article is arguing against. And that this comment is saying is nice.
I’m just glad that type inference can improve this sort of situation a bit:
ConfigManager configManager = new ConfigManager();
Why not just use auto (assuming C++) or var (assuming C#/Java)?
Because that’s type inference. The exact thing the article is arguing against. And that this comment is saying is nice.