-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[v2] Proposal - "rest of line" strings #402
Comments
I propose
|
IMO this might overcomplicate the format a bit. You could get the following file, which compiles but behaves unexpectedly.
is equivalent to
|
Yeah that makes sense. I’m also not sure it would be worth adding a FOURTH string format to the language just for two characters worth of convenience |
Because of the footgun that Lars mentioned, I'm going to close this one. I think typing two more characters ( |
Agreed, this matches with my own opinions on the matter. |
This was proposed by @imsnif a while back, and I don't think we gave it a proper discussion. I think there's a compelling argument to having "rest of line" raw strings.
So here's the idea, and feel free to lmk what you think!
A value that starts with
#!
will treat all following characters as literal string characters until the newNewline
That is, the the following two nodes are equivalent:
Notice how we don't need multiple
##
because the actual ending is theNewline
, so having more#
along the way doesn't matter.I'm not like, super genki about this looking at them both side-by-side, but I think there's still some value in it for some very real use-cases (like zellij's cmd nodes!).
The text was updated successfully, but these errors were encountered: