SuperFola@programming.dev to Programming Languages@programming.devEnglish · 10 months agoType inference was a mistakeborretti.meexternal-linkmessage-square41fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkType inference was a mistakeborretti.meSuperFola@programming.dev to Programming Languages@programming.devEnglish · 10 months agomessage-square41fedilink
minus-squareGobbel2000@programming.devlinkfedilinkarrow-up0·10 months agoI’m just glad that type inference can improve this sort of situation a bit: ConfigManager configManager = new ConfigManager();
minus-squarechellomere@lemmy.worldlinkfedilinkarrow-up0·10 months agoWhy not just use auto (assuming C++) or var (assuming C#/Java)?
minus-squareJakenVeina@lemm.eelinkfedilinkEnglisharrow-up0·edit-210 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.