I quite like this language:-
I like the params keyword. It just seems to make more sense than anything else.
I like the Attributes, they seem a perfectly decent substitute for Javas annotations.
I like that C# is similar to Java, which is useful because of my experience with Java.
I’m missing some of the classes that I’m used to using in my Java projects, but I can add them if I’m desperate so not much of a problem. I wish I could use Maps as I have before but, again, I can add them.
I DON’T like, however, that C# uses PascalCase instead of the camelCase that I’m used to. That’s actually taking some getting used to.
Hopefully there will continue to be more likes than dislikes.
If you find yourself using the “params” keyword a lot, it might be an indication of a bad design. I’m definitely NOT saying “don’t use that feature” but it’s intended for a pretty specific purpose, and shouldn’t be used so you can just pass whatever you want to any function you feel like.
As far as the naming case goes, there is a nice built-in refactoring tool in Visual Studio that lets you safely rename functions and variables so if you do feel like conforming to the C# standard, that tool makes it pretty painless.
I agree with you for the most part, but I would say at least “for those less familiar with the language” to stay away from params
. I always tell new developers, yes at a glance it looks convenient, but it doesn’t do what you think it does. So I just end up telling them to stay away from it until they’re absolutely sure they understand what it is they’re doing and why.
At the end of the day though, you’re correct. It’s just a feature. Use it if you need it… but if you do
and call it with
I’m going to reject your PR.
Yeah, I don’t use variable argument lists that often, but I do have a couple of specific cases in some old code where I do use them. I’ve used them, on occasion, for 40 years so I’m comfortable with them.
is pretty close to
Are they not the same thing function wise ?
C# devs
null reference exceptions