Live data from Hacker News

TypeScript 2.4

blogs.msdn.microsoft.com

11–20 of 52 posts

Re: TypeScript 2.4

#11
post #2

They've just fixed what I regarded as the top reason for avoiding it completely: the broken type checking on functions. It's a source of mystery that they didn't realise that was going to be a problem right from the start.

glad to see this fixed

Re: TypeScript 2.4

#12
Won't we stop transpiling everything once ES6 support (& modules) are ubiquitous?

I kind of feel like this is when everybody converted codebases to CoffeeScript and are now stuck with having to undo that...

Yes, I get strong typing has merits - but so does writing the native language.

Re: TypeScript 2.4

#13

Is Typescript goal to be the Java/C# of the browser/nodejs? static type checking, tooling and heavily OOP(as in Java/C#) based?

No. TypeScript has no dependency on classes the way Java or C# does; nor is class-oriented code the recondeded style by the TS team. As a matter of fact the typescript compiler core is all written as functions and immmutable objects with no classes (except for a polyfill for Map and Set).

TypeScript 2.3 has support for vue.js this injection style patterns (see https://github.com/Microsoft/TypeScript/pull/14141) which are way out of the realm of class-centric programming languages. Similarly the inference cabalities (expanded in 2.4) and the fundamental nature of the type system being structural rather than nominal is another give away of the language nature and direction.

So the short answer is TypeScript is a superset of JavaScript; and is as class-centric as JavaScript is.

Re: TypeScript 2.4

#14
post #12

Won't we stop transpiling everything once ES6 support (& modules) are ubiquitous? I kind of feel like this is when everybody converted codebases to CoffeeScript and are now stuck with having to undo that... Yes, I get strong typing has merits - but so does writing the native language.

This is just me, but there's no way I ever go back to vanilla JavaScript after having used TypeScript for a year.

Re: TypeScript 2.4

#15
post #12

Won't we stop transpiling everything once ES6 support (& modules) are ubiquitous? I kind of feel like this is when everybody converted codebases to CoffeeScript and are now stuck with having to undo that... Yes, I get strong typing has merits - but so does writing the native language.

I think there will continue to be es-next stuff that can be made available - im hoping that one day we will get macros in TS so we can experiment with new features/syntax and a compiler is a great way to do that.

But even if all of that does go away, types outweigh writing without types imo - but you can always take the output of TSC and stop using it going forward, its not obfuscated.

Re: TypeScript 2.4

#16
> Dynamic import() expressions

This is exciting. About a month ago, I tried this just expecting it to already be supported. I was sad to learn it wasn't.

Kudos to the Typescript team for the awesome, continual improvements.

Re: TypeScript 2.4

#17
post #12

Won't we stop transpiling everything once ES6 support (& modules) are ubiquitous? I kind of feel like this is when everybody converted codebases to CoffeeScript and are now stuck with having to undo that... Yes, I get strong typing has merits - but so does writing the native language.

I won't. TypeScript in particular has made my code much more maintainable and pleasant to work in compared to vanilla JS, even recent versions.

Re: TypeScript 2.4

#18
post #12

Won't we stop transpiling everything once ES6 support (& modules) are ubiquitous? I kind of feel like this is when everybody converted codebases to CoffeeScript and are now stuck with having to undo that... Yes, I get strong typing has merits - but so does writing the native language.

> Yes, I get strong typing has merits - but so does writing the native language.

Naturally. But the merits of strong typing far outweigh those of writing the native language, for me at least. If you have a project of any reasonable size, TypeScript is such a huge productivity boost it's incredible.

I was very sceptical (having indeed been burnt by trying CoffeeScript before) but the comparison doesn't really work with TypeScript. If it died tomorrow and we all decided to go without it, we'd just transpile to JS and be done with it - CS -> JS looks very, very different, but TS -> JS is the exact same code, just with types stripped out.

Post reply on HN