News for hackers. Stuff that matters.
Re:Show HN: Polly: A templating language for Rust by stestagg on Wednesday February 24, 2016 @03:51AM (#11165393)
It's 'truly logic-less' but with functions and components...
Re:Show HN: Polly: A templating language for Rust by Aaronepower on Wednesday February 24, 2016 @05:35AM (#11165752)
Well components, are purely static. They are the equivalent of text expansion, or string interpolation.

A Function's logic, isn't defined in Polly. You have to define it in Rust. This moves all the logic to your Rust server, where your logic should be. It also provides the advantage of being compiled, and optimised with the program, rather than if Polly defined it's own syntax for functions, and logic, and trying to parse that out at run-time.

Re:Show HN: Polly: A templating language for Rust by cptroot on Wednesday February 24, 2016 @05:26AM (#11165722)
I think the point is that templates themselves can't contain logic. All logic is declared at compile time so that the compiler can optimize it, but then used at runtime like any other templating language.
Re:Show HN: Polly: A templating language for Rust by swabaws on Wednesday February 24, 2016 @03:54AM (#11165406)
Yes, I had the same thought. Removing logic from templates all-together would hamper development, IMO. You need some basic level of logic to get by.