Better "Anonymous extension declarations" variant #8571
Closed
OJacot-Descombes
started this conversation in
LDM Notes
Replies: 1 comment
-
I don't think a separate discussion needs to be open for each variation on this syntax. That's why the design space discussion exists. This syntax flavor had already been suggested by the LDM: https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-10-14.md I personally don't find it better. It still runs into the same problems when trying to design for existing extension methods, in that the static container class may also contain non-extension helper methods. Otherwise it just trades one keyword for another. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Anonymous extension declarations
extension(T){ ... }
parts are nested in a static class.I suggest nesting
for(T){ ... }
parts in anextension
instead:Beta Was this translation helpful? Give feedback.
All reactions