KoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 2 天前What's a readabilitylemmy.worldimagemessage-square70fedilinkarrow-up1173arrow-down117
arrow-up1156arrow-down1imageWhat's a readabilitylemmy.worldKoalaUnknown@lemmy.world to Programmer Humor@programming.devEnglish · 2 天前message-square70fedilink
minus-squareCrackedLinuxISO@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up26·edit-22 天前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.
minus-squaredax@feddit.orglinkfedilinkarrow-up5·16 小时前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.
minus-squareGreenMartian@lemmy.dbzer0.comlinkfedilinkarrow-up6·21 小时前Also, 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.