A
A
Arthur Grand2015-10-29 11:15:11
PHP
Arthur Grand, 2015-10-29 11:15:11

Why do template engines use double curly braces?

Why do template engines use double, triple or even quadruple curly braces and not just single ones?
Does anyone know the real reason?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Svirsky, 2015-10-29
@artygrand

In my opinion, the reason is obvious - single brackets will conflict, for example, with JS.
and double openings are hardly used anywhere. it happens that template engines conflict (for example, symfony2 and in angularJS). In this case, for example, Angular supports setting arbitrary characters for templating engines.

A
Alexey Ukolov, 2015-10-29
@alexey-m-ukolov

Suddenly, because single curly braces have a special meaning in many programming languages.

G
GreatRash, 2015-10-29
@GreatRash

Not to be confused with language constructs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question