-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editorial: Refactor TemplateStrings SDO #2893
Conversation
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.
This is definitely better. I am a little bit tempted to further introduce a TemplateString
AO for the base cases, but it's probably not worth the overhead.
Hmm. Might be worth it... |
If you're inclined to do that refactoring, I wouldn't say no to it. |
Is this what you had in mind? I think it's an improvement, but it's debatable. There's 3 different places where the
Currently I'm doing the middle one. Do you have a preference? |
Yup, that's what I had in mind, and yes, I think putting the list wrapping around each invocation is the way to go. |
6470245
to
313acd4
Compare
(force-pushed to take a more logical path to the same endpoint) |
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.
lgtm!
313acd4
to
778890b
Compare
(force-pushed to squash 3 commits down to 1) |
(1) Factor out new AO TemplateString. (2) Move `« ... »` from the list-concatenation step to instead surround the call to TemplateString. (3) Do some simple inlining, from: 1. Let _x_ be TemplateString(|Y|, _raw_). 1. Return « _x_ ». to: 1. Return « TemplateString(|Y|, _raw_) ».
778890b
to
415600f
Compare
... to separately handle
This separates all the
_raw_/TV/TRV
stuff from the list-concatenation stuff, which I think makes it easier to see what's going on.(I don't think GitHub's diff is very helpful for this one.)