Re: [w3c/webcomponents] [templates] How featureful should the default processor be? (#682)

I think that keeping expressions in the default processors just simple keys will be the best for the first version. Even simple expressions like `a.b` or `a[b]` will end up having to define semantics that might not match JavaScript, or JavaScript best practice idioms of any given time, so we'd end up with a not JavaScript, but JavaScript like, expression language in the platform.

Ultimately I think we want to find a way to somewhat safely allow real JavaScript in the expressions with a built-in processor, and until then I think user-space processors can explore the feature space here pretty well.

FWIW - since this proposal is very much like the internals of lit-html - when lit-html produces an HTML template it doesn't put any expressions inside the delimiter, they're all just `{{}}` and associated with values from the JS template by order. I think this might end up being a very common approach, where the expression are empty, or have a generated key used to lookup in another structure produced from the actual expressions that the developers write.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/682#issuecomment-341851407

Received on Friday, 3 November 2017 23:29:22 UTC