tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
280 stars 56 forks source link

String interpolation #218

Open Gusarich opened 3 months ago

Gusarich commented 3 months ago

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

vitorpy commented 2 months ago

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.

anton-trunov commented 2 months ago

@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.