Fred Silberberg

Results 412 comments of Fred Silberberg

Discussed in LDM on May 1st: https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-05-01.md#adjust-binding-rules-in-the-presence-of-a-single-candidate

@yaakov-h I used var for convenience there. It would not be var in practice.

> In that case how would the compiler ever resolve an overload to something other than the type itself? I'm not sure what you mean. The idea is that a...

> then presumably every method call has to figure out whether the parameter is a possible param builder. Yes, but only in cases where an interpolated string is actually passed...

> How can this treat item format? However the builder wants? It needs to have an overload of `TryFormat` that accepts the interpolation hole content, which is both `i` and...

> Wouldn't the existing design avoid that kind of allocation if you chose to implement it kinda like this?: > > ```csharp > public bool TryFormat(int i, string format) >...

I don't particularly understand what you're asking @miyu. Presumably, the first parameter of `TryWrite` takes a builder type, and that would format the string however it wants.

> Is `baseLength` required to be exactly the total number of characters outside the interpolation holes, or is the compiler allowed to pad `baselength` to improve the chance that the...

The lowering section still needs to be fleshed out, and that will be based on LDM feedback on other parts of the proposal.

I prefer the first approach, especially since the public API here is something that we _will_ end up breaking at some point.