Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[String interpolation] for literals (constants) the same as in C# #1310

Open
6 tasks done
xperiandri opened this issue Aug 31, 2023 · 1 comment
Open
6 tasks done

Comments

@xperiandri
Copy link

I propose we implement string interpolation for constants

The existing way of approaching this problem in F# is use string concatenation using +

Pros and Cons

The advantages of making this adjustment to F# are making string literals consisting of several other string literals to be more readable

**The disadvantages of making this adjustment to F# ** do not exist

Extra information

Estimated cost (XS, S, M, L, XL, XXL): probably S

Related suggestions:
C# discussion dotnet/csharplang#2077

Affidavit (please submit!)

Please tick these items by placing a cross in the box:

  • This is not a question (e.g. like one you might ask on StackOverflow) and I have searched StackOverflow for discussions of this issue
  • This is a language change and not purely a tooling change (e.g. compiler bug, editor support, warning/error messages, new warning, non-breaking optimisation) belonging to the compiler and tooling repository
  • This is not something which has obviously "already been decided" in previous versions of F#. If you're questioning a fundamental design decision that has obviously already been taken (e.g. "Make F# untyped") then please don't submit it
  • I have searched both open and closed suggestions on this site and believe this is not a duplicate

Please tick all that apply:

  • This is not a breaking change to the F# language design
  • I or my company would be willing to help implement and/or test this (I can try having links to relevant source code)

For Readers

If you would like to see this issue implemented, please click the 👍 emoji on this issue. These counts are used to generally order the suggestions by engagement.

@xperiandri xperiandri changed the title [String interpolation] for literals (constants) [String interpolation] for literals (constants) the same as in C# Aug 31, 2023
@Happypig375
Copy link
Contributor

If we fix #1306, we can also do constant interpolation of integers and floating point numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants