winglang / wing

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

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

Open Chriscbr opened 2 months ago

Chriscbr commented 2 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 2 months ago

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