Closed littledan closed 4 years ago
The current specification draft caches by string, as tagged templates originally did, but the caching should be upgraded to cache by location, as they do now.
The current explainer includes a caching mechanism, as have the last few versions. It is analogous to tagged templates.
@dherman raised in TC39, how we could avoid repeated computation in extensible literals. Tagged templates have a mechanism for this--always returning the same object, which you could use as a key in a WeakMap. However, in the current proposal, there is no such object with identity to key off of.