Live data from Hacker News

TypeScript included with Visual Studio 2013 Update 2

blogs.msdn.com

61–70 of 111 posts

Re: TypeScript included with Visual Studio 2013 Update 2

#61

Why is everyone so surprised that Microsoft bundled a language that Microsoft built into a piece of software that Microsoft built? This says nothing about TypeScript's future among non-.NET developers.

don't know about popularity of typescript outside of MS land

But: here's the npm https://www.npmjs.org/package/typescript

nothing stopping you from running TS on linux.

Re: TypeScript included with Visual Studio 2013 Update 2

#62
post #39
post #17

While baking TypeScript into Visual Studio isn't a certainty of its future success (e.g. Silverlight), it is a good indicator of Microsoft's commitment to the language. As a former CoffeeScript user, I love TypeScript: it's a more consistent language driven by a real language designer, Anders Heijlsberg, author of Turbo Pascal, Delphi, C#, and now TypeScript. I am building 2 major projects using it: - RavenDB Managem…

The only thing needed now is a higher-level version of HTML... Something like XAML for instance.

You say XAML in jest but once you get over the learning curve, it is incredible expressive, it will make you hate HTML and CSS.

Re: TypeScript included with Visual Studio 2013 Update 2

#64
post #17

While baking TypeScript into Visual Studio isn't a certainty of its future success (e.g. Silverlight), it is a good indicator of Microsoft's commitment to the language. As a former CoffeeScript user, I love TypeScript: it's a more consistent language driven by a real language designer, Anders Heijlsberg, author of Turbo Pascal, Delphi, C#, and now TypeScript. I am building 2 major projects using it: - RavenDB Managem…

I also switched two of my research projects over to TypeScript from CoffeeScript [1,2]. I'd like to state up-front that CoffeeScript still has its merits in certain scenarios; they are two very different projects, despite both providing convenient `Class` abstractions over prototype-based inheritance.

With that said, using TypeScript has vastly decreased the amount of mental state I need to keep in my head when I develop one of my projects. The compiler uses the type annotations to double-check my logic, and Visual Studio gives me the ability to easily refactor interfaces as if I were using a statically typed language [3]. I could go on... but I will spare you the blog post. :)

I really wish there was a free or cross-platform alternative to Visual Studio for TypeScript autocomplete and IntelliSense. The WebStorm IDE claims to support TypeScript, but it gives me tons of incorrect compilation errors in my current projects. I hope it matures so there is an alternative. Anyone working on TypeScript tooling that is comparable to VS for different editors (e.g. Sublime)?

EDIT: Whoa, I completely missed this in the blog post; palantir is developing an Eclipse plugin [4]. They also developed a tool that converts CoffeeScript projects to TypeScript; interesting [5].

[1] https://github.com/int3/doppio Doppio: A JVM in TypeScript

[2] https://github.com/jvilk/BrowserFS BrowserFS: A full-featured file-system in your browser that emulates the Node fs API

[3] I'm referring to trivial refactorings -- renaming function/variable names and such. Refactors that are more complex, such as changing the function signature, must be done manually at call sites, but the compiler will catch your errors if you mess up or forget one.

[4] https://github.com/palantir/eclipse-typescript

[5] https://github.com/palantir/coffeescript-to-typescript

Re: TypeScript included with Visual Studio 2013 Update 2

#65

Have they been working on compilation speed? About a year ago I was trying some WebGL "bindings" that had definitions for all the constants and functions, and the game I was hacking on would take 20 seconds to compile on a fairly recent Macbook Air.

It has improved in recent releases, but I think they are focusing mostly on incremental compilation via the -watch flag. My projects still take 5-7 seconds to build from scratch on my MacBook Air.

You probably know this, but just for others' information: Type inference is expensive, as it requires global information about the project. As a result, compiling one TypeScript file in a project results in the compiler recompiling all of the referenced modules and definitions to re-build up that inference information from scratch. Using the -watch flag keeps the compiler alive with that information in-tact in memory, enabling incremental recompilation.

Re: TypeScript included with Visual Studio 2013 Update 2

#66
post #64
post #17

While baking TypeScript into Visual Studio isn't a certainty of its future success (e.g. Silverlight), it is a good indicator of Microsoft's commitment to the language. As a former CoffeeScript user, I love TypeScript: it's a more consistent language driven by a real language designer, Anders Heijlsberg, author of Turbo Pascal, Delphi, C#, and now TypeScript. I am building 2 major projects using it: - RavenDB Managem…

I also switched two of my research projects over to TypeScript from CoffeeScript [1,2]. I'd like to state up-front that CoffeeScript still has its merits in certain scenarios; they are two very different projects, despite both providing convenient `Class` abstractions over prototype-based inheritance. With that said, using TypeScript has vastly decreased the amount of mental state I need to keep in my head when I dev…

There is some emacs support for TypeScript. Not sure how good it is.

Re: TypeScript included with Visual Studio 2013 Update 2

#67
post #64

Earlier quoted context omitted.

I also switched two of my research projects over to TypeScript from CoffeeScript [1,2]. I'd like to state up-front that CoffeeScript still has its merits in certain scenarios; they are two very different projects, despite both providing convenient `Class` abstractions over prototype-based inheritance. With that said, using TypeScript has vastly decreased the amount of mental state I need to keep in my head when I dev…

There is some emacs support for TypeScript. Not sure how good it is.

I think it's just syntax highlighting, like the current ST support [1]. There's notable vim support [2], but... I prefer GUI editors for IDE-style development.

[1] http://blogs.msdn.com/b/interoperability/archive/2012/10/01/...

[2] https://github.com/leafgarland/typescript-vim

Re: TypeScript included with Visual Studio 2013 Update 2

#68
post #46

Earlier quoted context omitted.

I haven't found any disadvantage to TypeScript over JavaScript. It's also trivial to switch, since compilation mostly just removes type annotations. I have however been annoyed at not being able to use sweet.js macros.

I'm still on an earlier version of TypeScript, so I don't know if later versions have fixed this. We ran into trouble when creating knockout view models in type script. Basically, TypeScript was losing track of 'this', and the trick of using var self=this in the the "constructor" wasn't valid. We made it work, but it wasn't pretty and it certainly wasn't idiomatic typescript. Basically the problem was that we were tr…

Earlier versions of TypeScript had some significant typing issues in my experience, especially related to typechecking static fields on object instances (which you can't access through object instances -- you have to go through the class object).

Since the 0.9.5 release, I don't think I've had any particular issues with typechecking or the language. And as someone mentioned, if you use lambdas, the compiler will automatically handle performing the `var _this = this;` trick for you under-the-hood.

> we were trying to write TypeScript like we were writing C#

Yeah, you really need to approach writing TypeScript as if you are writing idiomatic JavaScript. I'm happy that I went through the JavaScript mill before discovering TypeScript, as it informed how I developed my project.

Re: TypeScript included with Visual Studio 2013 Update 2

#69
post #52

Earlier quoted context omitted.

XAML doesn't necessarily have strong IDE support, either. Although integrated into VS, it really is no comparison to the "REPL" of HTML/CSS + your favorite text editor and a browser.

Not sure I understand your use of REPL - in Visual Studio you edit XAML in the right pane, and the change is reflected in the left pane as you type. That's more efficient than editing HTML or CSS in a text editor, saving, switching to browser, refreshing page. Can you explain?

The XAML editor in Visual Studio was broken for years. Blend, once you learn how to use it, is a much nicer tool.

In any case, unlike HTML you really don't want to be writing XAML by hand.

Re: TypeScript included with Visual Studio 2013 Update 2

#70

Have they been working on compilation speed? About a year ago I was trying some WebGL "bindings" that had definitions for all the constants and functions, and the game I was hacking on would take 20 seconds to compile on a fairly recent Macbook Air.

No, it's still rather slow. We've "fixed" by doing conditional compilation (using an md5 of the files). A full compile of our project takes a few minutes.
Post reply on HN