News for hackers. Stuff that matters.
Re:Angular 2 Final Released by akst on Thursday September 15, 2016 @01:17PM (#12507936)
> That is exactly what I meant, sorry for not being clear.

All good, I'm probably tired (Australian time).

Maybe it's my inherit bias as an Ember user, but I'd argue Ember's templating language is alot simpler than you're suggesting

> But by logic I meant all sorts of control structures, which though looks light-weight at first, needs a large number of language elements to function. To name a few: variables, expressions (which in turn need operator precedence rules), scoping, and even composition if we count partials/templates with it.

Admittedly partials are a little weird, while I don't see them very often, it's still a fair point, however Ember templates don't deal with operator precedence as it doesn't have binary operators (entirely polish notation).

> Loops on the other hand requires not just simple array iteration syntax

Iteration doesn't have a blessed syntax, but instead utilises syntax that can be utilised by other components, and a better way to think of it is, the block inside the component is actually a function being passed to the component, which the component calls with every item of the collection.

> but also over hashes, and it also needs other constructs like filtering (`todo in todos | filter:search`)

It doesn't have pipes/filters, as that's easily expressed as a computed property in the js portion of a component. And I personally think scoping is pretty predictable imo.

Maybe you're just making a general remark about templates in general & i've read too far into it, then fair enough but in the case of Ember some of those don't apply, imo.

> behind the apparent simplicity there is always an entire language

Technically this is true, but I'm not sure why this matters, especially if it's trivial to learn? Because flip side of the argument, technically JSX is a different language to JS & HTML with even more complex semantics than a templating language because it carries the semantics of JS on top of it. You could make the same argument in favour of css over SASS/LESS, so I don't really see this as a big deal

Re:Angular 2 Final Released by jasim on Thursday September 15, 2016 @01:36PM (#12508113)
I haven't worked with Ember's templating syntax, so don't have any thoughts to offer there. I was however bitten by Angular v1's templating, on which my comments were based.

SASS and LESS both add language semantics over CSS and suffer from the same problem. So does for example Jekyll's templating language. But in case of CSS, the language additions are a practical necessity - it lacks even basic abstractions, which the pre-processors provide.

So there - trade-offs.

I've written in more detail about this topic at http://www.jasimabasheer.com/posts/evolution-of-view-templat..., if you are interested.

Re:Angular 2 Final Released by akst on Thursday September 15, 2016 @02:22PM (#12508496)
Sure, I'll give it a read.