koka icon indicating copy to clipboard operation
koka copied to clipboard

Support string interpolation

Open RandomFrenchman opened this issue 4 years ago • 2 comments

In the Koka book, the following syntax is used in order to display a number following a string: println("yielded " + i.show).

It tends to be quite heavy as the number of conversions increases. I think it would be nice to have a string interpolation syntax (maybe "yielded ${i}"?)

RandomFrenchman avatar Dec 24 '20 17:12 RandomFrenchman

This is probably not in the min-gen spirit. I wonder if it's possible to use dot syntax for convenient string concatenation.

exebook avatar Dec 28 '20 11:12 exebook

Please don't implement it like "yielded ${i}". Typing an extra symbol before each expression is very annoying. Implement it at least like it's implemented in C#: $"yielded {i}". But the most convenient way is of course just "yielded {i}".

m9xiuz avatar Apr 10 '21 20:04 m9xiuz