0

Definition of "logic":

Reasoning conducted or assessed according to strict principles of validity: "experience is a better guide to this than deductive logic".

Mustache's "sections" use conditional logic in the form of displaying blocks based on the value of a boolean, from the documentation:

Template:

Shown.
{{#nothin}}
  Never shown!
{{/nothin}}

Hash:

{
  "person": true,
}

Output:

Shown.

I'm therefore curios to learn in what manner is Mustache deemed "logic-less" if logic under my (likely naive/ignorant) definition occurs within its templates?

Ryan Brodie
  • 6,554
  • 8
  • 40
  • 57
  • From wikipedia: `Mustache is described as a "logic-less" system because it lacks any explicit control flow statements, like if and else conditionals or for loops; however, both looping and conditional evaluation can be achieved using section tags processing lists and lambdas.` – Jim Aug 23 '13 at 15:34
  • 1
    Isn't that an oxymoron though? Because if conditional evaluation can be achieved (regardless of syntax) it contains logic? – Ryan Brodie Aug 23 '13 at 15:50

1 Answers1

1

It's called "logic-less" compared to many other template systems. I don't think any particularly deep claim is intended. The answers to What's the advantage of Logic-less template (such as mustache)? may be enlightening as well.

Community
  • 1
  • 1
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487