winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.07k stars 198 forks source link

"{x}" prints strings with quotes if the value is `Json` #6921

Open Chriscbr opened 4 months ago

Chriscbr commented 4 months ago

If x is Json, then should "{x}" do something different than Json.stringify(x)?

Maybe... Pragmatically:

let x: Json = "hello";

log("hello, {x}");

Would be nice if it printed:

hello, hello

_Originally posted by @eladb in https://github.com/winglang/wing/pull/6219#discussion_r1679585483_

Chriscbr commented 4 months ago

Related: https://github.com/winglang/wing/issues/5890