DEV Community

loading...

Discussion on: How to get rid of the `new` C# keyword

Collapse
_siva_sankar profile image
Siva Sankaran S

Why do we need to get rid of new keyword ? The approach show here seems to be a syntactic sugar. Do this approach increase readability of code ?

Collapse
kiritchoukc profile image
KiritchoukC Author

Why do we need to get rid of new keyword ?
You don't need to. And you should not if you don't see any benefit.

The approach show here seems to be a syntactic sugar.
That's 100% syntactic sugar.

Do this approach increase readability of code ?
Readability is subjective.
You might be confused the first time you see this.
But then, it feels like the code is less noisy and cluttered with useless keyword and types