Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

111–120 of 316 posts

Re: TypeScript: a language for application-scale JavaScript development

#111
post #82

Earlier quoted context omitted.

I've written a LINQ style library for TypeScript that allows you to write something like this: 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

Have you used the popular library Underscore.js http://underscorejs.org/ ? The equivalent to your code in Underscore would be: _.chain([1,2,3]).map(n => n * n).filter(n => n >= 2).value()

As a .NET and JS developer underscore is definitely the secret sauce that means I don't miss linq at all. Lovely lovely little library.

Re: TypeScript: a language for application-scale JavaScript development

#112
post #75

Earlier quoted context omitted.

I've written a LINQ style library for TypeScript that allows you to write something like this: 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

Could you please explain why it would output that?

Typo, updated. Should have been n * n

Re: TypeScript: a language for application-scale JavaScript development

#113
post #4

Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…

Interesting. Worth noting that the Azure SDK [1] was released on GitHub over a year ago with the same attributes. The move to Codeplex is concerning. [1] https://github.com/WindowsAzure/azure-sdk-for-node

Using their own platform instead of a commercial competitor that is also closed source is concerning?! Would it also be concerning if github hosted their open source projects on github instead of on codeplex?

Re: TypeScript: a language for application-scale JavaScript development

#114

This looks great, but the IDE seems to be one of the key features, so we're going to need something other than Visual Studio. EDIT: they've got syntax highlighting for some other editors, but full completion and error reporting is still needed http://blogs.msdn.com/b/interoperability/archive/2012/10/01/...

The language support in VS is really great, and getting better with each release. Go to definition, code outlining, folding, type information on hover, intellisense; all these make writing code much less easier and error prone, especially if you are used to writing in a language like C# or Java in a good IDE.

Re: TypeScript: a language for application-scale JavaScript development

#115
post #4

Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…

Microsoft is doing a lot of community trust building steps that I wish Oracle / Sun were doing, I wonder if people take it seriously and if Microsoft will be ever "Cool" again in the startup / hacker community, or is taken as PR attempts? I personally like it.

Re: TypeScript: a language for application-scale JavaScript development

#116
post #4

Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…

Interesting. Worth noting that the Azure SDK [1] was released on GitHub over a year ago with the same attributes. The move to Codeplex is concerning. [1] https://github.com/WindowsAzure/azure-sdk-for-node

> The move to Codeplex is concerning.

What's concerning about moving the location where Microsoft hosts their code?

Re: TypeScript: a language for application-scale JavaScript development

#117
post #57

All 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…

Javascript is dreadfull , and its flaws are counter productive and intolerable. It has good things like closures and first class functions , and that's it. Most of js developpers hate javascript , but are forced to work with it. So they dont care what they use as client language provided it gets the job done. few people cares about Javascript. most of the devs hate it. But the browser as dev plateform is a fact.

With a name like Camus, how can you not be a fan of javascript?

Re: TypeScript: a language for application-scale JavaScript development

#118
post #9

Earlier quoted context omitted.

Also cool: in addition to the expected Visual Studio support, they've also provided support for Sublime Text, Emacs, and Vim. http://blogs.msdn.com/b/interoperability/archive/2012/10/01/...

Sourcing typescript.vim throws errors: http://pastebin.com/raw.php?i=HHDJDG7X

The error about ^M suggests it has DOS line endings. Try converting the line endings.

Re: TypeScript: a language for application-scale JavaScript development

#119
post #109

Earlier quoted context omitted.

I think you were referring to the JavaScript syntax when you said JavaScript is full of flaws, because IMHO the language itself - except the syntax component - is actually very good. Someone on Quora said[1] it very well: JavaScript is a wonderful language, deep down: It's Lisp-y, yet imperative. Its lack of support for threads has turned out to be a strength on the server side. And recent implementations have made i…

>Its lack of support for threads has turned out to be a strength on the server side. ummmm, can someone elaborate? I don't understand that statement.

I think it means the language forces designs and eventually an ecosystem that's optimized around having cooperative multitasking as the only option. That makes dealing with concurrency an easier task since every library you depend on also takes concurrency seriously. And since cooperative multitasking is much much more efficient than preemptive alternatives, you end up with applications with great efficient concurrency support by default.

Re: TypeScript: a language for application-scale JavaScript development

#120
post #68

$ t command not found clearly they could have named the compiler just 't' instead of the overly verbose 'tsc'. all those extra characters!!

    $ curl http://news.ycombinator.com/user?id=j
    No such user.
Clearly you could have named yourself just 'j' instead of the overly verbose 'jon6'. All those extra characters!!
Post reply on HN