4 ms·
It all looks really promising. Love it. I'm a little worried about "nameof" in the hand of amateur programmers though. Efficiency aside (because it's not effic
by mkhalil 12y ago
It all looks really promising. Love it.
I'm a little worried about "nameof" in the hand of amateur programmers though. Efficiency aside (because it's not efficient), code readability might take a hit.
- _random_ 12y agoGood for reflection and renames. ReSharper helps but I don't want to rely on it.
- miketesch 12y agoIt shouldn't have any efficiency implications. I have to imagine that it is interpreted at compile time, similar to the var keyword.
- nothrabannosir 12y agoIt's syntactic sugar, semantically equivalent: nameof(foo) <=> "foo" Efficiency doesn't change
- darklajid 12y agoHe explains that this is for refactoring. As others have said, I'd therefor expect this to be a purely compile-time feature that just inserts the name of the reference within. The whole reason for this keyword seems to be that you have no string ("foo") but a reference/name instead (foo). Which can be picked up easily by tools.