Re:C# 10 new feature CallerArgumentExpression
by linknoid on Monday November 15, 2021 @09:40PM
(#29236079)
A lot of the improvements are just logically extending the language to remove arbitrary restrictions. That's what most of C# 10 and 9 appear to be. So most of the features you wouldn't go out of your way to use, but instead stuff that used to be impossible is now possible. I can't say that I've ever wanted a generic attribute, or a constant interpolated string, but if I did want them, I'd be surprised when they didn't work. C# 8 was the last major new language features.
[ Parent
| on HN ]
Re:C# 10 new feature CallerArgumentExpression
by spaetzleesser on Monday November 15, 2021 @11:10PM
(#29236708)
But a lot of them seem totally arbitrary and inelegant. CallerArgumentExpression requires a lot of attributes. CallerMemberName gives you the name of the caller but not the class name. This is hard to explain. It just seems random.