Hacker News new | past | comments | ask | show | jobs | submit login

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 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".




Thanks so much for taking the time to respond in such a thorough manner :)

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 :/




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: