template strings

template stringsの動的評価
0

template stringsを動的に評価したいという議論があった

似たような話: http://ja.stackoverflow.com/questions/3153/変数からtemplate-stringsを生成したい

getify #LookingForWork @getifyX

@awbjs @brendaneich any way to do snippet 1 or 2 here, other than how snippet 3 does it? doubt it, but… gist.github.com/getify/f656f5d…

2015-01-07 10:09:23
BrendanEich @BrendanEich

.@getify Dynamic scope is from the Devil. Why do you think you want it? @awbjs

2015-01-07 10:12:26
getify #LookingForWork @getifyX

@ljharb @kangax @rauschma @scott_sauyet @slicknet i proposed an alternate ES discussion forum years ago, and /be decried it.

2015-01-07 10:13:46
getify #LookingForWork @getifyX

@brendaneich in particular, was wanting to dynamically construct template literals like: gist.github.com/getify/5c3add5… +@awbjs

2015-01-07 10:22:55
BrendanEich @BrendanEich

@getify No, sorry (not sorry!), you don't get a free implicit eval with template strings. @awbjs

2015-01-07 10:31:11
BrendanEich @BrendanEich

@getify Sure you can. Try using functions taking parameters mentioned in the template string's embedded expressions. #compositionftw @awbjs

2015-01-07 10:34:33
🇺🇦 Ingvar Stepanyan @RReverser

@getify @brendaneich A document or file having a preset .. so that the format does not have to be recreated each time thefreedictionary.com/template

2015-01-07 11:22:45
🇺🇦 Ingvar Stepanyan @RReverser

@getify @brendaneich But that's what we are doing in JS - recreating format every time we want to "template" something. Totally opposite.

2015-01-07 11:23:22
getify #LookingForWork @getifyX

@wycats @brendaneich @rreverser what's NOT niche is the idea of being able to reuse a "template" many times.

2015-01-07 11:40:38
getify #LookingForWork @getifyX

@wycats @brendaneich @rreverser a template literal is a one-time use "template"… like an IIFE.

2015-01-07 11:41:06
Yehuda Katz @wycats

@getify @BrendanEich @RReverser Are you arguing that "template" is the wrong name or that reusable interpolation is more common?

2015-01-07 11:41:28