Open rkrx opened 7 years ago
Definitely. Haven't started thinking about string interpolation, but definitely like the idea of ruby/es6 expressions.
The one other thing I'm thinking about is native support for Hack's XHP style embedded markup. So that html would be generated inline:
$html = <a href="${$obj->getLink()}">${$obj->body}</a>;
Something along those lines...
I am not sure about XHP. Would be a nice addition nontheless. But you should postpone XHP until you're sure, you wont need those syntax-structures otherwise. Having both native XML and native JSON would cover my needs a lot.
Allow ordinary code in template-strings (like in ES6+; incl. nested templates):
Nested strings (nested Backticks):
Compex example:
This is already possible with ECMAScript:
No special need for backticks - code in templates could (should?) be possible with double-quote-strings.