Closed bzick closed 11 years ago
Why do you use "~" and not simply "." as the concat-operator?
This is because "." is an array access operator in Fenom. "$a.$b" would be ambiguos.
Ah, ok. This is inspired by Smarty, right? What about "+" as concat-op?
This is because "+" is an math operator. Bad situation: {$a + $b}, it is math-op or concat-op? For PHP it very important, because concatenation and math operations are different.
One could detect the type of $a,$b and if string.. wait, this is odd, that implies lots of type checks.
My idea is not good. You are probably right in using the ~
.
What do you think about {$a .= $b}
as an additional syntax?
Like