G
Guest
I frequently see .NET coders, especially C# coders, use the following syntax:
if (null == something){DoSomething();}
instead of the much more intuitive
if (something == null) {DoSomething();}
Is this an example of anally-retentive programming held over from some bygone C era, or are there actual benefits to using this syntax in the .NET world?
I would have thought a modern compiler would not care about syntax order, as it would optimize such a statement to produce the best execution speeds. Can anyone enlighten me?
Thanks,
Stano.
if (null == something){DoSomething();}
instead of the much more intuitive
if (something == null) {DoSomething();}
Is this an example of anally-retentive programming held over from some bygone C era, or are there actual benefits to using this syntax in the .NET world?
I would have thought a modern compiler would not care about syntax order, as it would optimize such a statement to produce the best execution speeds. Can anyone enlighten me?
Thanks,
Stano.