I agree with others that a language should not become bloated and I think it is heading in that direction.
Announcing TypeScript 2.7
11–20 of 89 posts
Re: Announcing TypeScript 2.7
#12I 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.
Re: Announcing TypeScript 2.7
#13Earlier quoted context omitted.
JS is a big language. It continues to grow without removing features. One codebase can be very functional, another dynamically typed C++ from 2004, another pythonic. As long as they support the entire language while adding static typing (not an easy feat), it's going to grow. In that sense it is very much like C++, though it's still not in the same league of complexity of C++. If you want a small language, look elsew…
> JS is a big language. Kind of(maybe). But that's beside the point. Typescript is a separate language that happens to compile to Javascript. The TS team is in no way bound to support every style of programming that Javascript supports (and they don't, just by virtue of having strict typing).
Re: Announcing TypeScript 2.7
#14On 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…
Re: Announcing TypeScript 2.7
#15On 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…
I‘d contest that even for those categories adding more features is necessarily better. In fact, Word in particular is an excellent example of how adding features can result in a worse product.
On the other hand, I like programming languages with either a “batteries included” philosophy or a large ecosystem of easily usable libraries that allow you to solve common real-world problems quickly.
Re: Announcing TypeScript 2.7
#16Earlier quoted context omitted.
> JS is a big language. Kind of(maybe). But that's beside the point. Typescript is a separate language that happens to compile to Javascript. The TS team is in no way bound to support every style of programming that Javascript supports (and they don't, just by virtue of having strict typing).
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.
Re: Announcing TypeScript 2.7
#17On 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…
> 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.
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 story. TS has to support ES modules.
"unique symbol" is type system support for the long-present ES6 symbol concept.
Cleaner/prettier console output should be uncontroversial as an incremental improvement.
Numeric separators are an ECMAScript feature that need to be supported. TS has to support ES syntax.
Fixed length tuples were a long-standing proposal (nearly 2 years old) that had a lot of positive feedback from the community. Among people who were using tuples, the prior behavior was seen as very much wrong and we were convinced by the use cases. People not using tuples are unaffected, naturally. It's more of a bugfix than a feature.
Better narrowing under "in" and "instanceof" were also long-standing issues. The "instanceof" behavior in particular just looks like a bug; only from a spec-lawyer perspective is it really a feature per se. It's more of a bugfix than a feature.
Smarter object literal inference again basically amounts to a bugfix; TS was allowing extremely broken code, essentially due to some implementation details of how types' representations are optimized. It's more of a bugfix than a feature.
It's definitely understandable that the most exciting features are already in the language, but I don't see anything in this list and see "bloat".
Re: Announcing TypeScript 2.7
#18On 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…
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 TypeScript strives to model JavaScript as it's written broadly. While we could always take the stance that you have to rethink the way you write JavaScript, that would be unnecessarily stubborn. Hope that gives some insight!
Re: Announcing TypeScript 2.7
#19I hope that in the next version they will improve support for dynamic typing even further by disabling static typing.