Skip to content

Support template literals #466

Closed
Closed
@vgrichina

Description

@vgrichina

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

Regular template literals would be very nice for stuff like logging, so that you can basically have stuff like:

log(`transaction: ${hash} status: ${status}`);

instead of current

log('transaction: ' + hash.toString() + ' status: ' + status.toString());

This looks like a feature which only requires compiler-level sugar and zero runtime support.

More than that, we probably can hijack tagged templated literals to support UTF-8 string literals, i.e. have stuff like:

let utf8String = u`Hello, World`;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions