Closed mitchlloyd closed 7 years ago
{{#with}}
has been with us since the beginning. Changing its semantics at this point seems likely not in the cards for compat+perf reasons. (Note that I'm not aware of any, but I imagine that both of those problems exist.)
Plus, the existence of a community addon to fill the void lessens the necessity to do the change internally.
I'm unsure how that addon will be updated to support glimmer 2. The private API's it hacks into do not exist there...
It can be done with a tagless component.
@martndemus - Hmmm. Not really. There is no way to splat the input arguments. You could handle the common cases (say 1 to 5 args), but eventually it would fall down.
Based on the feedback it sounds like we shouldn't change {{#with}}
.
I've been convinced that changing {{with}}
to accept multiple arguments is a bad idea.
So who's going to submit the RFC to remove this feature from Glimmer?
https://github.com/tildeio/glimmer/blob/master/packages/glimmer-runtime/lib/syntax/builtins/with.ts
I'm not sure it should be removed...
As pointed out, this feature is implemented so I'm closing the issue.
On a related note, I hope to see an RFC to pull ember-let into core sometime soon. In block form, it's basically a better with
unless you are relying on with
's falsey value behavior. The inline form is unique and reads quite nicely in my experience.
Is there a reason that
{{#with}}
doesn't accept and yield multiple arguments as the let addon does? Has this been discussed before? I'd be happy to write up a quick RFC, but I'm wondering if there is any prior art here.