KoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 9 days agoWhat's a readabilitylemmy.worldimagemessage-square59fedilinkarrow-up1159arrow-down115
arrow-up1144arrow-down1imageWhat's a readabilitylemmy.worldKoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 9 days agomessage-square59fedilink
minus-squareCrackedLinuxISO@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up23·edit-28 days agoGary should learn about Lazy<T> and stop reinventing the wheel. I put blame on any of his senior coworkers who didn’t use this as a teaching opportunity during PR.
minus-squaredax@feddit.orglinkfedilinkarrow-up7·8 days agoOr just services.AddSingleton<X>. There’s plenty to criticize in C#, or any language, but this ain’t it. Most of the new language features just make the code shorter without loosing clarity. Really liking newer C# versions.
minus-squareGreenMartian@lemmy.dbzer0.comlinkfedilinkarrow-up6·8 days agoAlso, Lazy is thread safe. Gary’s code is not.
Gary should learn about Lazy<T> and stop reinventing the wheel.
I put blame on any of his senior coworkers who didn’t use this as a teaching opportunity during PR.
Or just
services.AddSingleton<X>
. There’s plenty to criticize in C#, or any language, but this ain’t it. Most of the new language features just make the code shorter without loosing clarity. Really liking newer C# versions.Also, Lazy is thread safe. Gary’s code is not.