Replies: 3 comments 41 replies
-
Regarding:
One possible approach here is to adopt the two stage approach (it fits with expectations on how type parameters work today), but introduce some syntax that implies "re-run stage 1 here", eg: public static extension E2<T> for I<T>
{
public static void M2<T2>(out T2 t) where T2 is T { t = default; }
}
|
Beta Was this translation helpful? Give feedback.
-
Regarding LINQ, I can't see a way to keep it binary compatible. The way forward would be designing new version with the 2 stage process in mind, marking existing extension methods obsolete, and using overload resolution system to prefer the new extensions (albeit I'm not sure right now exactly how to achieve a smooth transition regarding overload resolution - is it the overload priority attribute? ) |
Beta Was this translation helpful? Give feedback.
-
To that end, would it make sense to allow the old form
However, I didn't understand how switching between the forms is not a breaking change if there are behavioral differences. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-10-02.md
Agenda
readonly
contexts andset
Conditional
codeBeta Was this translation helpful? Give feedback.
All reactions