http://i.imgur.com/XB3ib.png Oh M$ Oh...
You lost me at "M$". I'd like to think that HN's level of discussion is above that.
TypeScript: a language for application-scale JavaScript development
51–60 of 316 posts
Re: TypeScript: a language for application-scale JavaScript development
#52Awesome, great to see this finally released. I'm a dev in FUSE Labs ( http://fuse.microsoft.com ) and we've been dogfooding TypeScript for a while now. I'd be happy to answer any questions about using TypeScript vs vanilla JS, converting a large codebase, etc.
I'm wondering how to make use of an existing object system. We already have a JS framework that simulates classes and inheritance in the Java-style OOP.
Re: TypeScript: a language for application-scale JavaScript development
#53Weird that I didn't spot a friendly list of features.. seems to have some cool ones, like a shortened function expression (from the doc PDF): (x) => { return Math.sin(x); } and modules, which are implemented using the immediately invoked function expression pattern: module M { var s = "hello"; export function f() { return s; } } Syntax seems more clear than CoffeeScript and tool chain will probably shape up better. L…
I like the shortened function form. I played around with CS for a while before going back to JS, but I do miss being able to do something like: var names = people.map((p) -> return p.name); (or something along those lines). Funnily enough, it reminds me of C#'s LINQ: var names = people.Select(p => p.name);
from([1,2,3]).select(n => n * n).where(n >=2).toArray()
which outputs [4, 9]
Hoping to open source it soon.Edit: typo, n * 2 should have been n * n, sorry for the confusion
Re: TypeScript: a language for application-scale JavaScript development
#54All of these compile-to-JS efforts are great, and as much as I love things like CoffeeScript I have to say I definitely worry about language fragmentation. JavaScript is full of flaws, but its monopoly in the browser space has brought about one intriguing and welcome side-effect: a VERY efficient market for both employers and employees. It's easy to overlook how important this common denominator has been for everyone…
Re: TypeScript: a language for application-scale JavaScript development
#55Re: TypeScript: a language for application-scale JavaScript development
#56Awesome, great to see this finally released. I'm a dev in FUSE Labs ( http://fuse.microsoft.com ) and we've been dogfooding TypeScript for a while now. I'd be happy to answer any questions about using TypeScript vs vanilla JS, converting a large codebase, etc.
Re: TypeScript: a language for application-scale JavaScript development
#57All of these compile-to-JS efforts are great, and as much as I love things like CoffeeScript I have to say I definitely worry about language fragmentation. JavaScript is full of flaws, but its monopoly in the browser space has brought about one intriguing and welcome side-effect: a VERY efficient market for both employers and employees. It's easy to overlook how important this common denominator has been for everyone…
Re: TypeScript: a language for application-scale JavaScript development
#58Re: TypeScript: a language for application-scale JavaScript development
#59No list comprehension? No, Thanks.
In the interim, a simple library like underscore is quite succinct:
_.map([1,2,3], n => n * n)
With more library support you could even do infinite lists with something like this: _.generate(index => 1.0 / index);Re: TypeScript: a language for application-scale JavaScript development
#60All of these compile-to-JS efforts are great, and as much as I love things like CoffeeScript I have to say I definitely worry about language fragmentation. JavaScript is full of flaws, but its monopoly in the browser space has brought about one intriguing and welcome side-effect: a VERY efficient market for both employers and employees. It's easy to overlook how important this common denominator has been for everyone…
It is always a bad idea to tie yourself too strongly to any single language.