3 ms·
> It's not for you, though. It is "not for me" though because of the reason I said: Too much boilerplate for common usage. If it had less it would be for "me"
by Someone1234 5y ago
> It's not for you, though.
It is "not for me" though because of the reason I said: Too much boilerplate for common usage. If it had less it would be for "me" and everyone else too, just like the nameof() is.
So it is a niche tool exactly because of the implementation. I bet a lot of people expected nameof() to be niche too, but it isn't.
- wvenable 5y agoNo, it's a niche tool because it's a niche tool. This feature has very limited use; even more limited than CallerMemberName. It actually makes a lot of sense not to invent a lot of new syntax or compiler logic to handle something this rarely used.
- aliswe 5y agoagreed, if they made it to be eg. expressionof() - which to be fair might happen in the future - then it would be just as usable as nameof()