4 ms·
It's 'truly logic-less' but with functions and components...
by stestagg 11y ago
It's 'truly logic-less' but with functions and components...
- swabaws 11y agoYes, 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.
- cptroot 11y agoI 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.
- Aaronepower 11y agoWell 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.