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…
Announcing TypeScript 2.7
21–30 of 89 posts
Re: Announcing TypeScript 2.7
#22Earlier quoted context omitted.
> On the other hand I am concerned that TypeScript is becoming a very bloated language I came to say exactly this. Are there actually people out there asking for all of these nuanced features? I've been excited about TS for a while and used it for several side projects with great success...but with each new release and new set of "features" my excitement wanes a bit.
I do some of the feature planning / prioritization for TypeScript. The strict class property initialization check was the one of the highest-voted, most-commented, and most-duped "unfixed" issues on the issue tracker. Definite assignment assertions are a necessary co-feature for class property initialization checks to work ergonomically. ES module interop is just TS keeping up with the evolving ES6 / CJS interop stor…
I really appreciate the work that the TS team is doing, and understand that they are up to a very difficult task in trying to keep up with JS while also augmenting the type system capabilities to cover more cases.
With regards to making the language more complex, yes, i agree that it's not something pretty, but at the same time i find these kind of additions similar to the recent JS additions: you can still ignore them if you don't need them. E.g., you can still code perfectly fine without using classes, or symbols, or whatnot. There is the issue of having to deal with different "dialects" of JS/TS when reading others' code, but that still happens in pretty much every mainstream language i know of :/
Re: Announcing TypeScript 2.7
#23Earlier quoted context omitted.
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…
Indeed, the only Typescript feature I can think of that isn't purely for type checking or lifted from ECMAScript is Enums, and Enums have been around forever.
Re: Announcing TypeScript 2.7
#24On 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…
ReasonML is great but it still so immature with little issues here and there that might be annoying to some people. I expect it to be a great alternative in the future but not now.
That's for example what makes something like Elm much better. How Elm dealt with the whole echosystem to make it use separate packaging system, not bad editors support (needs a lot of improvement for VSCode IMO) and the simplicity of the language made it a really powerful alternative that I'd use instead whenever possible.
Re: Announcing TypeScript 2.7
#25Earlier quoted context omitted.
They don't have to, but as long as they want to market themselves as a "typed superset of Javascript" (see homepage), they do. For many people, that is the point.
Yep. And this is important, it allows people to move most JS projects incrementally to TS projects. If they fall far behind the features that many JS projects are using, that won't be true anymore, and those people will start using Flow instead (flow.org)
Re: Announcing TypeScript 2.7
#26I really like TypeScript and it has ushered me into the node environment.
Re: Announcing TypeScript 2.7
#27Earlier quoted context omitted.
Indeed, the only Typescript feature I can think of that isn't purely for type checking or lifted from ECMAScript is Enums, and Enums have been around forever.
Well it has supports for JSX and decorators which AFAIK aren't in the spec yet. It also has a syntax for class mixins without actually doing any desugaring when the code is transpiled. So it's not quite just JS + types.
Re: Announcing TypeScript 2.7
#28I wonder if there was ever a discussion that definite assignment assertions should have a strict mode flag to disallow. They seem like something that can be abused to escape the static type system.
I use tslint to disallow practices that TS has no compiler flag for.
Re: Announcing TypeScript 2.7
#29Instead 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.
Re: Announcing TypeScript 2.7
#30On 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…
As a PM on the team, I actually _share_ your concern! ;) In fact, we're very mindful about the cognitive overhead of new features, but we're also motivated by pragmatism. These features have been highly demanded to help them write real-world code. My coworker Ryan has written up a pretty good explanation of why we tackled the feature set that we did: https://news.ycombinator.com/item?id=16277367 Keep in mind that Typ…