meetings/2024/LDM-2024-06-26.md
Champion Issue: https://github.com/dotnet/csharplang/issues/5497
Format proposal: https://github.com/dotnet/csharplang/pull/8242
We spent today looking over the proposed format for static member translation for extension types. The format discussion revolves around how much compatibility we want to maintain with existing extension methods, and whether we want to force other languages to do explicit work to support them. There are two real extremes here:
modreqs on the types, or using CompilerFeatureRequired, to force compilers that don't understand
to pretend those members don't exist. This would ensure that we don't have to support any amount of back-compat work with new extensions, but also means that we'd rule out a migration story entirely.After some discussion, we ended up pulling the extremes into separate parts; instance method extensions, and everything else. For everything else, LDM is strongly against allowing them to be called in static
form by other languages unless they do the work to explicitly support that form. For instance methods (ie, static void M(this int i) methods today), we're very interested in allowing back-compat. This would
mean a few concrete things for the proposal to go chase down:
instance.M() and E.M(instance) form, since the latter is valid today for existing extension methods defined on a static type.E.M(instance) format behave when E has both void M() and static void M(Instance i) defined on it?We want to take these questions back and look at how complicated they will be to solve before making a final decision on the migration story.
We will block consumption in other languages without explicit support for extension types for all extension members except instance members. For instance members, we will explore making the emit binary-compatible, and how much we will have to overhaul to get that to work, then come back and make a final decision on whether to block consumption.