KoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 6 days agoWhat's a readabilitylemmy.worldimagemessage-square70linkfedilinkarrow-up1190arrow-down118
arrow-up1172arrow-down1imageWhat's a readabilitylemmy.worldKoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 6 days agomessage-square70linkfedilink
minus-squareCrackedLinuxISO@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up27·6 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-up8·5 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-up6arrow-down1·6 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.