3 ms·
> I like JS format strings -- you can write arbitrary code in them, but they are compile time only Genuinely curious: what exactly does "compile-time" mean in
by saghm 10y ago
> I like JS format strings -- you can write arbitrary code in them, but they are compile time only
Genuinely curious: what exactly does "compile-time" mean in the case of JS? Is it like C macros (modifying the source code before parsing)?
- Manishearth 10y agoNo, it's not that, I was using the term loosely. I meant that you cannot use a string value as a format string. It only exists in the form of a literal, and it gets evaluated when the interpreter evaluates that literal. You cannot store it and format it later.
- saghm 10y agoAh, I see. Thanks!