Open baronfel opened 10 months ago
Would the "subset" include more than concatenation?
That's all my immediate use case required, bit I didn't want to immediately go to supporting arbitrary interpolated strikes because I know that won't work with the requirement that attribute arguments be literals, basically.
I propose we allow using interpolated string expressions in Attributes, as long as the constructs involved in the interpolated string are valid for use as literals.
After this change, the
Obsolete
attribute parameter on theDeprecated
member below would be valid:The existing way of approaching this problem in F# is to not use interpolated strings and instead build up strings using concatenation of literal portions.
Pros and Cons
The advantages of making this adjustment to F# are consistency in string handling across the language.
The disadvantages of making this adjustment to F# are extension of the compile-time computation feature of some interpolated strings, potentially raising end user confusion about when constructs are allowed to run.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): M
Related suggestions: None that I could find
Affidavit (please submit!)
Please tick these items by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the :+1: emoji on this issue. These counts are used to generally order the suggestions by engagement.