Roslyn: FormattableString and IFormattable should win over string in overload resolution

Created on 22 Jan 2016  路  3Comments  路  Source: dotnet/roslyn

It's a terrible design to have string win over FormattableString and IFormattable, this makes using FormattableString for logging libraries impossible. Please fix this issue.

Area-Language Design Resolution-Won't Fix

Most helpful comment

This is a big hole in the design then, it makes this feature much less useful. That combined with the fact that the default is Current Culture makes this very only useful in very niche situation. :(

All 3 comments

We cannot "fix" this issue - it would be a breaking change. There is also no reasonable way to fix it, as the conversion from an interpolated string literal to string is an identity conversion.

This is a big hole in the design then, it makes this feature much less useful. That combined with the fact that the default is Current Culture makes this very only useful in very niche situation. :(

Yes, it was _intended_ to be very useful only in a very niche situation. It is _supposed_ to act like a string for most purposes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kindermannhubert picture kindermannhubert  路  3Comments

marler8997 picture marler8997  路  3Comments

DavidArno picture DavidArno  路  3Comments

codingonHP picture codingonHP  路  3Comments

MadsTorgersen picture MadsTorgersen  路  3Comments