tact icon indicating copy to clipboard operation
tact copied to clipboard

String interpolation

Open Gusarich opened this issue 10 months ago • 3 comments

It would be great to introduce string interpolation into Tact, which would make building strings even easier. It could look like:

sb.append("${self.s1}, your balance is: ${self.s5}");

Originally posted by @anton-trunov in https://github.com/tact-lang/tact/issues/23#issuecomment-1948436332

Gusarich avatar Mar 30 '24 09:03 Gusarich

Would you folks be OK if I given it a try with ES6 backticks syntax?

The grammar changes would be inspired by sample ES6 grammar that ships with ohm.

I can't commit to timelines though.

vitorpy avatar Apr 21 '24 20:04 vitorpy

@vitorpy Sure! Feel free to give it a try. I should probably tell you that implementing string interpolation is usually far from trivial. This is why I didn't assign a milestone to it yet.

anton-trunov avatar Apr 21 '24 20:04 anton-trunov

@vitorpy any progress or further thoughts on that?

Gusarich avatar Jul 13 '24 18:07 Gusarich