-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feedback #85
Comments
Yes, please see existing issues. Note that the code you've given is in fact already legal and so cannot be used.
True, this proposal aims to solve dedenting, not indenting. |
Wouldn't it be better if it solved both? |
Depends on what additional complexity is required to do so, and how valuable we think doing so is. Personally I don't think indenting is very valuable so I am not inclined to incur any additional complexity to enable it. |
I have run into use cases where I needed to control indenting. |
Can you elaborate more on this? When I test the code I provided I get an error
Even if the syntax is lexically valid, I don't think it has any semantic meaning. |
See previous issues. |
Oof, ok |
I started a list of potential ECMAScript proposals and this was on my list 😄.
I think the README does a pretty good job of explaining why this feature is necessary. However, I had a different syntax in mind. Have you considered using triple back ticks? e.g.
I think this would behave like multiline strings in Elixir. Sepcifically, the indentation of the last ``` would determine where the indentation starts. I call these lexically indented template literals.
Maybe I'm wrong, but it doesn't seem like this proposal would support the case where you want all lines to be indented by some amount. Specifically, this criteria
e.g.
would result in
but maybe I acutally want the starting indentation
With this proposal, that doesn't seem possible.
Another benefit of triple back ticks, in my opinion, is that they are more ergonomic with tagged template literals. I can lift any existing tagged template literal by simply replacing single backticks with triple back ticks, e.g.
vs
What do you think?
The text was updated successfully, but these errors were encountered: