4 ms·
I am most excited about template strings, simply because they let you write multiline strings. e.g. instead of "hello\n" + "world"; use `hello world`;
by McP 12y ago
I am most excited about template strings, simply because they let you write multiline strings.
e.g. instead of
"hello\n" +
"world";
use
`hello
world`;
- evv 12y agoBut who needs typescript for that? http://tc39wiki.calculist.org/es6/template-strings/ http://tc39wiki.calculist.org/es6/template-strings/
- judah 12y agoThat is precisely what TypeScript has implemented: ES6 string templates. Remember, TypeScript is JavaScript + optional types. One nice thing about the template strings in TypeScript is you can use those and still compile to ES3/ES5 for today's browsers.
- deleted 12y ago[deleted]
- TheAceOfHearts 12y agoYou can compile ES6 for today's browsers too. Check out 6to5.
- nvivo 12y ago> But who needs typescript for that? Who needs javascript if you have dart? Who needs dart if you have go? Who needs go if you have erlang? Who needs erlang if you have c? Who needs c if you have assembly? Who needs assembly if you have binary code? Who needs binary code if you can just control electric signals by manually plugging and unplugging a cable to the wall? Apparently all you need to build a good website is a power cord and some patience!
- zodiakzz 12y agoThe JavaScript programmer in me welcomes that but the PHP programmer in me is a bit annoyed for having to remember another.. inconsistency.
- Pxtl 12y agoNot surprising from MS - that was a feature in C# 1 and it immediately made me angry at every language that doesn't support it.