Building a formatted string is kinda verbose. You'll probably end up by creating small formatter components per each use case. On the other hand in e.g. JavaScript string interpolation is super easy - ${a} + ${b} = ${a + b}.
import { fmt }
def XXX(a int, b int) (c string, err error) {
fmt.Printf<int>?
---
'$ + $ = $' -> printf:tpl
a -> printf:args[0]
b -> printf:args[1]
(a + b) -> printf:args[2]
printf -> :c
}
Proposal
Introduce new type of sender, that can be processed by both analyzer (ensure everything is correct) and desugarer (translate to "before" version)
Problem
Building a formatted string is kinda verbose. You'll probably end up by creating small formatter components per each use case. On the other hand in e.g. JavaScript string interpolation is super easy -
${a} + ${b} = ${a + b}
.Proposal
Introduce new type of sender, that can be processed by both analyzer (ensure everything is correct) and desugarer (translate to "before" version)
Analyzer Rules