Live data from Hacker News

TypeScript 7

devblogs.microsoft.com

201–210 of 321 posts

Re: TypeScript 7

#201

Remember when people would argue about how types weren't worth the effort? I love TypeScript, if nothing else for how it's been able to popularize types.

I have personally had three conversations (2 online, 1 in person) where the other person has said, almost verbatim, “I have never had a typing error in JavaScript”. Two of these people were people whose work I respected, so it could not understand how they could possibly hold that position.

"I have never had a typing error in Javascript" — [Object object]

Re: TypeScript 7

#202
post #186

Remember when people would argue about how types weren't worth the effort? I love TypeScript, if nothing else for how it's been able to popularize types.

In 2004 we solved the types for JS with ECMAScript 4 (or ActionScript 2.0). Unfortunately this was in the middle of browser wars, so no one cared about the standards and all of that work was lost like tears in rain. Around that time I attended MS conference where they introduced IntelliSense and it was a forming experience for myself. You could do actual programming basically with , , arrow keys and . "x = " and ther…

> In 2004 we solved the types for JS with ECMAScript 4 (or ActionScript 2.0).

> Unfortunately this was in the middle of browser wars, so no one cared about the standards and all of that work was lost like tears in rain.

> Around that time I attended MS conference where they introduced IntelliSense and it was a forming experience for myself. You could do actual programming basically with , , arrow keys and .

I think you’re off by at least 6-7 years. Visual Studio had autocomplete since at least version 6. And yes it was magical the first time you experienced it.

Re: TypeScript 7

#203
post #16

the real story here is an incredible team that managed to simultaneously keep two separate codebases alive for the most advanced type system known to mankind (yeahhh yeahh Hindley-Milner eat your heart out). huge congrats to the team! looking forward to the Rust rewrite ;)

Steve Francia (author of Hugo and a bunch of other top Go projects) wrote up some thoughts of Go's fit in the agentic era: https://spf13.com/p/go-the-agentic-language/

> in my experience, a change that stays local in Go ripples through lifetimes and trait bounds in Rust

imo extensive use of generics/trait bounds and explicit lifetimes in Rust is a huge code smell. Large projects should be making liberal use of trait objects and smart pointers to keep everything understandable and modular. Giving an agent a simple coding practice SOP for Rust should be enough to garuntee basically the same localized refactorability that Go has.

Re: TypeScript 7

#204
post #194

Congrats on launch. The code is beautiful, and the test suite is quite solid. Over the past year, I've been working on porting the v7 tsgo compiler back into TypeScript - https://github.com/tsoniclang/tsts It's fully functional now, but 2x slower than the original tsc and 10x slower than tsgo. But hopefully in a month or so, we'll get to C# and Rust targets and it should be able to compile itself to become nearly as…

That tsts project looks very interesting. I suppose there are various practical reasons for doing this. For me I'm just glad to see an easy way to run the newest TypeScript compiler (and I guess type checker?) in the browser. There's an unofficial Wasm build of tsgo/ts7, if I recall was about 12Mb. Another advantage of tsts I imagine is the ease of diving into the compiler internals as it's running (interpreted) instead of a binary distribution, another language (though I like Go), or having to recompile it on every change. Good luck with the project, I'll be keeping an eye on its progress with interest.

Re: TypeScript 7

#205

Remember when people would argue about how types weren't worth the effort? I love TypeScript, if nothing else for how it's been able to popularize types.

There's been a pendulum swing of sort during my career: static languages like C++/Java, then dynamic ones like Python/Ruby/JavaScript, and now back toward typed languages like TypeScript/Rust/Swift.

My read is that people were never really against types: they were against type systems that got in the way. Older ones often weren't expressive enough, so you ended up writing verbose patterns just to appease the compiler.

That's why dynamic languages gave startups a sizable velocity edge for a while. Modern type systems (with optionals, unions/sum types, inference, etc.) are completely different.

To paraphrase a comment I once read here on Hacker News: I'll take static typing with sum types over dynamic typing, but I'll take dynamic typing over static typing without sum types...

Re: TypeScript 7

#206

Remember when people would argue about how types weren't worth the effort? I love TypeScript, if nothing else for how it's been able to popularize types.

You need to meet some people who argue that types are positively bad!

Re: TypeScript 7

#207

Remember when people would argue about how types weren't worth the effort? I love TypeScript, if nothing else for how it's been able to popularize types.

Type systems just used to be bad. Anything that forces you to use a class hierarchy to represent an "OR" type (sum types) is painful to work with. Modern languages like TypeScript / Rust / Swift / Kotlin that have sum types are dramatically much nicer.

C also has sum types.

Re: TypeScript 7

#208
post #79

Earlier quoted context omitted.

Types are a safeguard, they rule out certain errors. So using them is mostly for maintainability, and especially in large codebases and teams that becomes a thing. I think that comment is clear in that he likes to work alone which for problems of a certain size just isn't feasible

> Types are a safeguard, they rule out certain errors I have migrated to TypeScript just about a year ago and it's my third try to migrate to TS from JS during the last decade and finally a successful one. While TS went a long road since the first versions which were incredibly hostile, my rewrite of a large codebase from js to ts revealed exactly zero type-related bugs.

Static types are not _that_ useful to catch bugs, if only because type related bugs tend to surface very quickly, especially in strongly typed language like Python. So a good CI suite is usually enough to catch them, but you do need good coverage. Even if they make it to prod, they won't survive long...

Static types are IMHO more useful for speed, maintenance/refactoring of large projects, and code completion in IDEs. But a codebase in production is unlikely to have much type related bugs...

Post reply on HN