Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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`;



Not surprising from MS - that was a feature in C# 1 and it immediately made me angry at every language that doesn't support it.


But who needs typescript for that?

http://tc39wiki.calculist.org/es6/template-strings/


That 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.


You can compile ES6 for today's browsers too. Check out 6to5.


> 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!


The JavaScript programmer in me welcomes that but the PHP programmer in me is a bit annoyed for having to remember another.. inconsistency.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: