▲ 8 ▼ C# 14 Extension Members: A Deep Dive Into Power, Patterns, and Pitfalls (www.c-sharpcorner.com) submitted 1 year ago by SmartmanApps@programming.dev to c/csharp@programming.dev 2 comments fedilink hide all child comments
[–] NigelFrobisher@aussie.zone 1 point 1 year ago (1 child) This is definitely straying into footgun territory. permalink fedilink source hideshow 1 child comment replies: [–] JakenVeina@midwest.social 1 point 1 year ago No moreso than extension methods already did, I think. The only real concern is naming conflicts, which are generally an immediate compiler error that's easily resolved. Certainly a little more likely for something like an indexer, that doesn't HAVE a name, but what are the odds, really, of not only wanting to add an indexer to a type where it makes sense to have one and that type doesn't have one already, but also that there would be MULTIPLE different conflicting ways for that to make sense? Personally, I think this has been a long time coming. permalink fedilink source parent
[–] JakenVeina@midwest.social 1 point 1 year ago No moreso than extension methods already did, I think. The only real concern is naming conflicts, which are generally an immediate compiler error that's easily resolved. Certainly a little more likely for something like an indexer, that doesn't HAVE a name, but what are the odds, really, of not only wanting to add an indexer to a type where it makes sense to have one and that type doesn't have one already, but also that there would be MULTIPLE different conflicting ways for that to make sense? Personally, I think this has been a long time coming. permalink fedilink source parent
all 2 comments