I filed a GitHub issue but it was suggested this might need to go through evolution.
Can file:line:-line default parameters be added to dynamic member lookup subscripts? It'd be super useful for surfacing the source context of an issue through to the dynamic caller in question.
In general it would be nice to loosen the requirements around the dynamic member lookup. Right now it fails with subscript<T>(dynamicMember: KeyPath<Self, T>) but succeeds with subscript<T>(dynamicMember dynamicMember: KeyPath<Self, T>) which seems more specific than any other lookup I've seen. Being able to apply the general shape of the simple lookup with other defaulted parameters would be nice.
Isn't this just a product of the fact that subscript<T>(dynamicMember: KeyPath<Self, T>) declares a subscript whose external name is subscript(_:)? You're allowed to rename the (inner) parameter name as you see fit for dynamic member lookup, so I wouldn't want it to be the case that any unlabeled subscript which accepts a String (or KeyPath) argument to be considered a 'match' for the purposes of dynamic member lookup.
This is very much related to the desire I've had for several years that operator functions should accept file: and line: for capturing point-of-use info.
This is the best argument I’ve seen thus far that these shouldn’t be represented as parameters, because the calling convention for a protocol method doesn’t have any place to put extra parameters. :-( Then again, sometimes you do want to propagate file/line info, so simply doing something besides parameters wouldn’t necessarily work either.