-
Notifications
You must be signed in to change notification settings - Fork 28
SIP-72 Dedented Multiline String Literals #112
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
base: main
Are you sure you want to change the base?
Conversation
content/dedented-string-literals.md
Outdated
> lines. However, if you write whitespace at the beginning of a line in addition to what’s before | ||
> the closing quotation marks, that whitespace is included. | ||
|
||
### Elixer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*Elixir
content/dedented-string-literals.md
Outdated
|
||
## Literal/Singleton Types | ||
|
||
`.stripLiteral` strings are not literals, and cannot generate `String & Singleton` types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo .stripMargin
. Not sure if transparent inline is addressed for current art of Singleton via custom solution.
Just a thought, instead of having a new syntax construct, we can probably have yet another standard string interpolator. Can be macro to deal with the problem at compile time. |
@SimY4 the proposal discusses why a string inteprolator wouldn't work as well. Specifically, it won't compose with other interpolators like |
@lihaoyi on this tho, in terms of what's easier to evolve - a language or a library DSL, I think library is much more flexible in this regard. Libraries can chose to provide DSLs that will deal with margins differently. I did that for my own custom DSLs and it worked pretty great. Users don't have to add strip margin at the end of every string block - it just worked. Over time you can deprecate and phase out the old DSL from the library. You can't phase it out of the language. |
No description provided.