Live data from Hacker News

TypeScript 7

devblogs.microsoft.com

51–60 of 321 posts

Re: TypeScript 7

#51
Seeing these graphs of astounding performance gains with less memory requirements makes one wonder, Why am I using server-side TypeScript and not Go?

Re: TypeScript 7

#52
post #39

Earlier quoted context omitted.

Look at some of the typing present in MS COM back in the IE5/6 days and we can discuss more. I can honestly tell you - I'll take untyped languages any day of the week over that clusterfuck. Personally - I also think people really underestimate just how much the tooling around types has improved over the last 20 years. If I'm having to try to look up the difference between iBrowserInterface6 and iBrowserInterface5 and…

completely agree. but I felt like even then it was clear that types were a good idea and the implementations were not. For instance I started programming on Java 4 or 5 and the types were pretty bad---but still it was obviously the right way to go compared to JS or, god forbid, shell.

Java has a lesson of what can go wrong with types, just as parent says. That example is dates and times. So many types…

And before Java finally settled on what we have today, we had 3rd-party libraries like jodatime that tried to fix it.

I guess it’s in a good state today, but it took a LocalDateTime.MAX to get there. I mean an Instant.MAX. No, I mean an OffsetDateTime.MAX. No, I mean new Date(Long.MAX_VALUE). Oh wait I meant new Timestamp(Long.MAX_VALUE). No, I mean LocalTime.MAX.

I’ll stop now, but i could go on.

Re: TypeScript 7

#53
post #6

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 ;)

I am not sure a rust rewrite would be meaningful. Go is great because it's fast to code.It's easy to reimplement typescript in go 1:1 just by looking at the code. Rust on the other hand would take a lot longer to develop. Maybe rust is 20% faster than go but overall the increase from typescript with go is good enough. Maybe rust would yield a 14 times speedup over the 11 times in vscode but go is already good enough…

A Rust rewrite would have an easy way to expose an API, something they're still debating how to do and deferring to 7.1.

But the team has already choose. They explained their reasoning and IMO it makes sense: they didn't want a rewrite, they wanted a bug-for-bug file-by-file translation. With a borrow checker and no GC, Rust sometimes forces you to structure things differently (especially in a compiler that usually has a lot of circular structures), so it was not worth it.

Re: TypeScript 7

#54
post #9

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 ;)

> most advanced type system known to mankind (yeahhh yeahh Hindley-Milner eat your heart out) This TypeScript release is largely about performance. Isn't OCaml still at least twice as fast (and maybe even faster for incremental compilation on very large codebases)?

I don't think GP was referring to transpilation speed when they wrote "most advanced type system known to mankind".

Re: TypeScript 7

#55
post #11

Earlier quoted context omitted.

jokes aside, have you heard of the Jevons Paradox[1]? it feels like the "induced demand" effect to me with the whole "just one more lane" phenomenon you sometimes can see in roadways. when you increase the efficiency of a thing you thereby expand the set of things it can economically be used for, causing an overall increase in total consumption over time - not a decrease like you'd expect from just having made it muc…

Yes, I saw the YouTube video about Jevons paradox from Hank Green yesterday. :)

The Jevon's Paradox. And it is not a paradox :-)

Re: TypeScript 7

#56

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.

> Remember when people would argue about how types weren't worth the effort?

> if nothing else for how it's been able to popularize types.

This is such an odd, javascript dev take.

Re: TypeScript 7

#57

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 ;)

They picked Go after meaningfully considering Rust (and others). I don't remember all the reasons for it but it was detailed in the original blog post.

Re: TypeScript 7

#58

Earlier quoted context omitted.

I don't recall anyone disliking types . Lots of people disliked static typing , or more directly static, explicit typing . For instance, I've been around many conversations over the years where people would say goofy things like they couldn't use Python because it's untyped. That's insane: Python is strongly typed. It's also dynamically typed, which is a different dimension. There are some genuinely untyped languages…

> I don't recall anyone disliking types > where people would say goofy things like they couldn't use Python because it's untyped. That's insane: Python is strongly typed. It's also dynamically typed, which is a different dimension. hmm maybe you don't understand type-checking INSIDE IDE, NOT during runtime?

That is what the parent author means. Static vs dynamic typing is along the dimension of when the type is checked, and strong vs weak typing is a matter of how strongly bound names adhere to types. JS, for instance, is super weak here, you can assign a numerical value to something and in the next line re-assign it to a string, an array, or even a function object.

Re: TypeScript 7

#59
post #39

Earlier quoted context omitted.

completely agree. but I felt like even then it was clear that types were a good idea and the implementations were not. For instance I started programming on Java 4 or 5 and the types were pretty bad---but still it was obviously the right way to go compared to JS or, god forbid, shell.

> but still it was obviously the right way to go compared to JS or, god forbid, shell. I just don't think this is true. Frankly - it's hard to argue this at all (even today) given that JS is the dominate language on the planet, and it lacks types... as does python, which had a reputation for decades as THE language to use to teach new folks to code. Or take PHP which dominated server development for a LOOONG time: al…

> as does python, which had a reputation for decades as THE language to use to teach new folks to code

I am very perplexed by this. I am going through Neetcode's DSA course where he explains what RAM and arrays are, but then he goes on to say something like "but since we are going to use Python, none of this applies." Personally, I learned the most about how software really works from reading The Rust Programming Language. It not only teaches you how to program in Rust, but also how memory works, what a string really is, etc.

Post reply on HN