Live data from Hacker News

Announcing TypeScript 2.7

blogs.msdn.microsoft.com

41–50 of 89 posts

Re: Announcing TypeScript 2.7

#41
No incremental compiler? I thought that was coming in 2.7. Really hope that lands soon. Compile times are my only complaint about TS, otherwise it is so much nicer than writing JS for anything mildly complex.

Re: Announcing TypeScript 2.7

#42

On the one hand I am glad they are continuing to enhance TypeScript. On the other hand I am concerned that TypeScript is becoming a very bloated language. If you have seen the latest edition of Stroustrup’s C++ Programming Language book you know what a bloated language looks like. Is that where TypeScript is headed? Programming languages are not like your Word or Excel where more features is better. Some programming…

Looking at the 2.7 updates, they don't really seem to be adding more features that result in bloat - instead there is a lot of work to make existing features more predictable and catch potential mistakes. Sounds good to me.

Re: Announcing TypeScript 2.7

#43
post #40

TypeScript is a great improvement over JS, still held back by the horrible state of the JS module system in browsers. You write your code and it does what you want, then you spend a month figuring out amd vs esnext vs systemjs and Babel vs browserify vs requireJS vs webpack vs god knows what else. And then when you find the solution that works.. two weeks later it is deprecated, the docs are gone, there is no clear m…

First of all you probably shouldn't complain about the JS ecosystem if you barely know anything about the JS ecosystem. This is evidenced by you bundling several things in your "amd vs esnext vs systemjs and Babel vs browserify vs requireJS vs webpack" which aren't directly comparable. Babel is a compiler, ESNext is a language specification (now ES6 since after being been finalized more than 2 years ago). amd, system…

Furthermore, you usually don't need Babel if you're a Typescript user because the Typescript compiler covers more or less the same ground.

Use Typescript+Webpack if you like types, or Javascript+Babel+Webpack if you like surprises, and in either case use ES6 module imports.

Re: Announcing TypeScript 2.7

#44
post #39

Earlier quoted context omitted.

The root problem is that most companies don't spend any time planning their projects. It should only take a couple of days and yet companies just don't do it. The bad coding style that you sometimes see in JavaScript land is just a symptom of a greater problem that static typing masks but doesn't actually fix. I like dynamic typing because then I can see straight away if the project is crap or if the team is crap.

I think Javascript is definitely way too forgiving. I just had a situation where a property name was mistyped. The value was "undefined" which then can be compared against strings. So the code worked without warnings but the results were wrong. Took several days to track this down in a long promises chain. With a typed language this wouldn't even have compiled.

But with JS you don't need to wait for your code to compile so you can test it much quicker. If you write tests then this is almost never a problem.

With typed languages, I often lose my train of thought while waiting for the compiler. When warnings come up, I'm like a robot, I don't actually think, I just follow the line numbers.

Statically typed languages make me lazy. I feel like I spend all my time and mental energy catering to the compiler. I like dynamically typed languages because it forces me to consider everything and keeps me on my toes.

Re: Announcing TypeScript 2.7

#45

TypeScript is a great improvement over JS, still held back by the horrible state of the JS module system in browsers. You write your code and it does what you want, then you spend a month figuring out amd vs esnext vs systemjs and Babel vs browserify vs requireJS vs webpack vs god knows what else. And then when you find the solution that works.. two weeks later it is deprecated, the docs are gone, there is no clear m…

I love that there are currently two replies to you, both implying you're an idiot for not knowing how to do this, and both presenting different solutions.

Re: Announcing TypeScript 2.7

#46

My favourite feature of TypeScript is that it supports dynamic types. I hope that in the next version they will improve support for dynamic typing even further by disabling static typing.

Seems you were downvoted a bit, but I think your comment is hilarious ;^)

Re: Announcing TypeScript 2.7

#47
post #39

Earlier quoted context omitted.

I think Javascript is definitely way too forgiving. I just had a situation where a property name was mistyped. The value was "undefined" which then can be compared against strings. So the code worked without warnings but the results were wrong. Took several days to track this down in a long promises chain. With a typed language this wouldn't even have compiled.

But with JS you don't need to wait for your code to compile so you can test it much quicker. If you write tests then this is almost never a problem. With typed languages, I often lose my train of thought while waiting for the compiler. When warnings come up, I'm like a robot, I don't actually think, I just follow the line numbers. Statically typed languages make me lazy. I feel like I spend all my time and mental ene…

You can simply erase the types with TS and it’s ready to go. I think tsc does this automatically, but I’m not really sure because I always wait for the compiler to finish out of habit. It doesn’t seem to be incremental at all yet, so compilation times noticeably grow longer as your project does, unfortunately.

Re: Announcing TypeScript 2.7

#48

I have an idea for the next version of TypeScript. Instead of compiling directly to JavaScript, it should compile to CoffeeScript first and then to JavaScript - That's a great feature I'd love to see. Of course, this feature wouldn't be possible without also adding support for meta-source-maps (aka source-map-maps). That way we can experience the pleasure of debugging in 3 different languages at the same time.

I know it's a joke, but the thing about sourcemaps is already do-able. If you have a sourcemap describing A->B, and a separate sourcemap describing B->C, then there already tools for composing the sourcemaps to create a sourcemap for A->C. (This is similar to a thing that Browserify and Webpack have to do when you're using a transform like Babel on each of the individual input files.)

Re: Announcing TypeScript 2.7

#49
post #9

On the one hand I am glad they are continuing to enhance TypeScript. On the other hand I am concerned that TypeScript is becoming a very bloated language. If you have seen the latest edition of Stroustrup’s C++ Programming Language book you know what a bloated language looks like. Is that where TypeScript is headed? Programming languages are not like your Word or Excel where more features is better. Some programming…

TypeScript itself doesn't really add new language features; it just tracks the ECMAScript spec and considers proposed features for implementation after they hit stage 3. The enhancements coming out in new TypeScript releases are largely related to typing expressiveness / type inference precision (covering more edge cases where one might have previously resorted to `any`) and strictness (catching more errors at compil…

[deleted]

Re: Announcing TypeScript 2.7

#50

TypeScript is a great improvement over JS, still held back by the horrible state of the JS module system in browsers. You write your code and it does what you want, then you spend a month figuring out amd vs esnext vs systemjs and Babel vs browserify vs requireJS vs webpack vs god knows what else. And then when you find the solution that works.. two weeks later it is deprecated, the docs are gone, there is no clear m…

I love that there are currently two replies to you, both implying you're an idiot for not knowing how to do this, and both presenting different solutions.

I never called him an idiot, I just called him out for not researching at all before posting. His understanding of Javascript has not been updated in at least 3 years based on the fact that he called ES6 ESNext, even though ES6 has been released for almost 3 yars.

There's also two different compilers for C, but it's not considered complicated to get started running a C program.

Post reply on HN