thefrontside / ember-let

Create variable bindings inside your handlebars templates
MIT License
52 stars 16 forks source link

consider aliasing if-let to with? #21

Open machty opened 7 years ago

machty commented 7 years ago

I don't feel super strongly about this but maybe it'd be nice for this library to also alias if-let to with? Rationale: with is an unfortunate name whose falsy inverse behavior is unexpected, whereas if-let speaks more to its semantics and putting it in this addon might be a nice way to collectively nudge folks away from with.

Robdel12 commented 7 years ago

I mean, I like it.

mmun commented 7 years ago

I like it too.

machty commented 7 years ago

ok so let's add it. who knows how to alias stuff?

rwjblue commented 7 years ago

I would add an AST transform to rewrite with to if-let:

Links:

tchak commented 6 years ago

with takes a single argument where I would expect if-let to take multiple...