Live data from Hacker News

TypeScript 7

devblogs.microsoft.com

251–260 of 321 posts

Re: TypeScript 7

#251

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

I like TypeScript. It catches bugs in programs that Go doesn’t.

Re: TypeScript 7

#252

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

For one, you’re not using TypeScript server-side. Whatever execution engine you are using is executing transpiled or JavaScript. And yeah, I don’t know who in their right mind is starting projects in TS/JS/python these days except when they don’t have an option.

> I don’t know who in their right mind is starting projects in TS/JS/python these days except when they don’t have an option.

I agree, although I would say that for web projects, writing the backend in TS is still a really great option because it means you can use TSX, which has a much better UX than any alternatives. For example https://usefresh.dev/ is much nicer to use than any non-TS options I've found, including Go and Rust where you basically end up using text-based templates along the lines of Jinja.

Re: TypeScript 7

#253

Major ts pain point is scoping tsconfig settings for lib and types configurable for subsets of a project. My project is a webapp, but I have node types in my ide tooling because of vite.config.ts, and playwright and unit tests. If I add a node api to a react component, tsc won't complain. Current method to isolate dom lib from node lib requires project reference spaghetti, numerous tsconfig.json and tsbuildinfo outpu…

Yes, tsconfig is a mess to scope. It needs a re-design to allow glob-based matching for all options and in typescript instead of jsonc.

Re: TypeScript 7

#254
Awesome! Off-topic, can we get something like TS for PHP now? Tools like PHPStan work fine, but I'd love a typed language on top of PHP that can catch a lot of things on compile time. I want to be able to compile my symfony routes, avoiding as much as possible on runtime.

I've been thinking about this since 2022 and haven't really gotten further than "Hmm, I would like this".

I'm aware that tooling catches most stuff, but being able to shift this even more to the left (compile time) would be great.

I'm just very used to Rust, where my hand is being held

Re: TypeScript 7

#256

Earlier quoted context omitted.

Not the op, but this TS migration started long before AI was able to help. It was done slowly and carefully, as a project supporting millions of users should. And the benefits are very clear. Bun’s port was a vibe coding fever dream that happened from one day to the next, with much looser motive, and yet to be proven reliable.

Bun's migration to Rust was nothing more than a marketing stunt to sell more Claude subs under the impression it can perform this kind of work at scale, assuming that most who were convinced by it wouldn't look under the hood at what really took place. It has its merits as a proof of concept that could eventually be cleaned up and released properly later, but I can't see it any other way. Too many see it as this mira…

Also it cost $165K in tokens

Re: TypeScript 7

#257
post #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 is a very charitable read. I remember plenty of dumbasses who said: I don't need a type system, cause I know what I am doing and I don't create bugs.

Re: TypeScript 7

#258

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.

You can go a long way with just javascript, eslint and prettier if you work solo, but IME work is a low-trust environment which means that either you're a wolf and you do what you want or you have to use C# and enable nullable checks.

Re: TypeScript 7

#259
post #25

Earlier quoted context omitted.

I'm glad that TypeScript uses JSDoc and not the hideous XML format [1] that Microsoft's other languages use. [1] https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...

I'm a big C# fan but XML docstrings definitely suck. We also got stuck with XML-based project files somehow, despite .NET Core/.NET 5+ being a complete rewrite.

This is my biggest annoyance with c#. I've always wanted to try to add jsdoc or something in the compiler. Little more annoying than having to use > and < in a comment

Re: TypeScript 7

#260

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 would chose typescript over js, Python and perhaps ruby. but I would use Scheme over typescript. I would probably use f# or ocaml over Scheme for most projects.

it is not an either or.

Post reply on HN