Live data from Hacker News

Announcing TypeScript 1.0

blogs.msdn.com

81–90 of 118 posts

Re: Announcing TypeScript 1.0

#81
post #52

We've been using TypeScript for 9 months now on a large project. It's fantastic. There's now way I'll go back to pure JavaScript again. The type system just catches so many defects, and they're of the kind that are hard and boring to find (typos). Plus IntelliSense integration (including jsdoc) is great. On the downside, our project takes some time to compile so we had to build a tool to do it incrementally. Plus it…

Agreed, TypeScript is great, but the compiler is excruciatingly slow. I have to segment my app into multiple sub-build areas and only build a subset at a time, which is annoying because I frequently end up making small changes outside of that subset of code. My app is only around 25000 lines of code and a full compilation still takes around 50-60 seconds which, in a JavaScript workflow, is a lot of friction.

I've never actually used TypeScript until today, but just the tutorial code takes forever to compile, this snippet took 2 seconds for example, whaaat??

    interface Person {
        firstname: string;
        lastname: string;
    }

    function greeter(person: Person) {
        return 'Hello, ' + person.firstname + ' ' + person.lastname;
    }

    var user = {firstname: 'John', lastname: 'Doe'}

    document.body.innerHTML = greeter(user);
It's a shame really, because it looks like a really cool project.

Re: Announcing TypeScript 1.0

#82
post #69

Earlier quoted context omitted.

I hope the respective developers are listening. It should be noted that most of these 'try X' editors are not marketed as a product, but I do agree that calling it 'professional' was mistake. The warts show up during heavy usage of a tool (the overflow example) and I was quick to reach conclusions based on the first impressions. But all the features like completion, line numbers, syntax highlighting do deserve respec…

The Try it for CoffeeScript was meant to be extremely simple, not to replace JSFiddle and such. The errors will be moved to the output area in next release. Someone might get around to implementing proper editor into it (say CodeMirror). That said, MS has people they pay for developing TypeScript, CoffeeScript is just of bunch of folks who enjoy working on the compiler and helping others. You certainly shouldn't expe…

I described some details that would help implement a rich code editor (like CodeMirror) in Try CoffeeScript in this issue:

“Use rich code editor in Try CoffeeScript on coffeescript.org” – https://github.com/jashkenas/coffee-script/issues/3076

I’m glad to hear that compile errors will finally be displayed in the output area in the next release (https://github.com/jashkenas/coffee-script/pull/3425). If anyone feels like improving that interface even further, they could try implementing the mockup in this issue:

“Highlight code errors and move error message in Try CoffeeScript” – https://github.com/jashkenas/coffee-script/issues/3077

Re: Announcing TypeScript 1.0

#83
post #78

We've been using TypeScript for 9 months now on a large project. It's fantastic. There's now way I'll go back to pure JavaScript again. The type system just catches so many defects, and they're of the kind that are hard and boring to find (typos). Plus IntelliSense integration (including jsdoc) is great. On the downside, our project takes some time to compile so we had to build a tool to do it incrementally. Plus it…

Can you give an example of a defect that the type system catched? You said typos but that's something JSLint would catch as well so not sure if it's a strong argument.

This talk is about porting a AngularJS app to Typescript, and the kind of errors it catches just by adding type definitions: https://www.youtube.com/watch?v=u6TeBM_SC8w

I've not yet ported my Angular apps to Typescript but I'm very much itching to do so.

Re: Announcing TypeScript 1.0

#84
post #52

We've been using TypeScript for 9 months now on a large project. It's fantastic. There's now way I'll go back to pure JavaScript again. The type system just catches so many defects, and they're of the kind that are hard and boring to find (typos). Plus IntelliSense integration (including jsdoc) is great. On the downside, our project takes some time to compile so we had to build a tool to do it incrementally. Plus it…

Agreed, TypeScript is great, but the compiler is excruciatingly slow. I have to segment my app into multiple sub-build areas and only build a subset at a time, which is annoying because I frequently end up making small changes outside of that subset of code. My app is only around 25000 lines of code and a full compilation still takes around 50-60 seconds which, in a JavaScript workflow, is a lot of friction.

It takes under 5 seconds for me to compile my project of about 5000 lines. So it's not really a problem for me yet, though I agree it would be if the waitingtime where to become any longer. Besides that, I've also been really enjoying developing in Typescript!

Re: Announcing TypeScript 1.0

#85
post #18

Anders is my favourite language designer, ever :) TypeScript is something I'm still trying to get more buy-in from my team, but the issue is the lack of decent autocomplete/static analysis in anything other than Visual Studio. I'm working on that problem myself, actually.

+1 for IntelliJ. Their support for typescript is pretty good. I actually tried Visual Studio and IntelliJ's webstorm, and descided to go with Webstorm. Also the support has improved over time, though I'm still hoping for some nice code generation support for Typescript

Re: Announcing TypeScript 1.0

#86
post #19

Earlier quoted context omitted.

asm.js is a subset of JavaScript, and to be easy to optimize, it removes most of the dynamic stuff from JS and leaves a simple, low-level dialect that is basically equivalent to LLVM IR or to C. You can compile many things to C and LLVM IR, like C++, C#, and so forth. You can compile the VMs of dynamic languages like Python, Lua and Ruby, but compiling them directly would be inefficient - you'd need type checks all o…

OK, so are you saying that compiling the language's runtime environment, including the GC, to asm.js would not be efficient enough? That makes sense. I guess I was hoping that there may be some way to compile the runtime such that the GC wouldn't need to be compiled, and the GC of whatever is interpreting the asm.js code (e.g. SpiderMonkey) could be used instead.

That's roughly what happens when TypeScript gets compiled to JavaScript, it can use the browser's GC. asm.js is used to avoid the browser's GC, either when the original code doesn't need a GC since it uses manual memory management, or it uses a different type of GC from the browser and wants to use that instead (which is effectively the same thing).

Re: Announcing TypeScript 1.0

#87

Most significant announcement IMHO: > Today, we're announcing that we will begin taking pull requests for the TypeScript compiler and language service. A relatively-flagshippy MS project becomes truly open source. This is awesome!

You're required to sign a CLA before you can contribute and they only accept pull requests for bugs.

Nothing prevents you from forking, but the main repository doesn't look 100% free.

Re: Announcing TypeScript 1.0

#88
post #80

Earlier quoted context omitted.

But isn't it because in the enterprise projects JavaScript code is written by Java/C# developers who think they know JavaScript, while they really don't? I've seen multiple examples of "enterpisey" web apps, and there was no joy, just because developers didn't know how to build a good application with JavaScript and even more - they didn't care at all. With a "don't touch anything that works" mindset that lots of ent…

> But isn't it because in the enterprise projects JavaScript code is written by Java/C# developers who think they know JavaScript, while they really don't? No, it is because: - Unit tests have zero value over new features - Project development tends to be outsourced to teams with high attrition rates - Most of the time cheaper developers are what matter - No one cares about quality, because there are no options to ge…

If you're willing to live in sunny SE QLD, Australia, and good at C# as well as JS, get in touch.

Re: Announcing TypeScript 1.0

#89
post #52

Earlier quoted context omitted.

Agreed, TypeScript is great, but the compiler is excruciatingly slow. I have to segment my app into multiple sub-build areas and only build a subset at a time, which is annoying because I frequently end up making small changes outside of that subset of code. My app is only around 25000 lines of code and a full compilation still takes around 50-60 seconds which, in a JavaScript workflow, is a lot of friction.

It takes under 5 seconds for me to compile my project of about 5000 lines. So it's not really a problem for me yet, though I agree it would be if the waitingtime where to become any longer. Besides that, I've also been really enjoying developing in Typescript!

Same here for a project three times this size. Still I find it extremely slow compared to CoffeeScript I was using before. I'm used to saving the file and instantly refreshing the browser/rebooting node.js.

Re: Announcing TypeScript 1.0

#90
post #54

Having spent quite a bit of my dev life with typed languages and now coding a LOT in pure JavaScript, I'm actually not at all thrilled by TypeScript. Yes, pure JS is bit hard to maintain and it does occasionally pisses me off but at the same time it is liberating. Not having to constantly keep adding types all over, not having to constantly refactor things because I now accept object instead of an int etc is refreshi…

"cool algorithms that could have inferred types as much as possible" - like Hindley-Milner type system? Like OCAML/Haskell/F#? There is only one reason JS could be chosen. Because it's everywhere. Almost any other modern language is realistically better. But unfortunately Web is Closed to JS/HTML/CSS.
Post reply on HN