You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ES6 has some wonderful functionality based on strings wrapped in the back-tick (`) instead of the standard double-quote (") and single-quote (') characters.
Please, PLEASE add full support for the ES6 back-tick functionality!
The text was updated successfully, but these errors were encountered:
This is probably not that hard to implement as a syntax sugar. But the benefit of string interpolation is somewhat watered down by the existing support for Python string formatting:
local total = 37;
The total is %g (%02g with tax)" % [total, total*1.05]
and the named version:
local o = {total: 37, withTax: 1.05*self.total};
"The total is %(total)g (%(withTax)02g with tax)" % o
which both yield:
"The total is 37 (38.85 with tax)"
With your proposal, you would also be able to do the somewhat similar-looking:
local total = 37;
`The total is ${total} (${"%02g" % (total*1.05)} with tax)`
Which would be desugared to
local total = 37;
("The total is " + total + " (" + "%02g" % (total*1.05) + " with tax)")
With that in mind, how badly do you still want it? :)
The main reason I would like to see the back-tick is because I sometimes I move code from a JS file into a JSON file and I hate that I need to undo the ES6 coolness.
ES6 has some wonderful functionality based on strings wrapped in the back-tick (`) instead of the standard double-quote (") and single-quote (') characters.
Please, PLEASE add full support for the ES6 back-tick functionality!
The text was updated successfully, but these errors were encountered: