3 ms·
> it doesn't come with any downsides One downside: if you move from interpolating a simple variable name to an expression, then you have to move it out-of-line
by JoshTriplett 7y ago
> it doesn't come with any downsides
One downside: if you move from interpolating a simple variable name to an expression, then you have to move it out-of-line from the string again (or you have to support interpolating arbitrary expressions into strings, which gets really painful and makes it hard for editors to check/highlight/etc).
- xixixao 7y agoI am absolutely advocating for arbitrary expressions, I should have made that even clearer in my example. Again, the burden is on the editors/compiler, but it massively simplifies life for the developer using the language. check/highlight is supported just fine for many languages that have this feature (it's likely that parts of Rust already require similar editor implementations for some other parts of its syntax).