Live data from Hacker News

TypeScript 7

devblogs.microsoft.com

91–100 of 321 posts

Re: TypeScript 7

#91
After running out of Fable credits in a day on my max plan I started looking around for ways to trim down my token usage and came to the realization that all of the type spaghetti that opus wrote is probably eating up like 50-70% of my tokens.

A clean django project is probably 3-4x less code than the equivalent TS based service.

It made me consider dropping strict mode and defaulting to js for most simple things.

Re: TypeScript 7

#92

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 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…

[dead]

Re: TypeScript 7

#93
post #89

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…

There's a school of thought that consider the term "types" reflect to the properties that exist in programs even before they are run, as in they are a property of the programs themselves, not their state at runtime. This thinking—which is also what type theory talks about—does consider Python untyped: reading a Python program along with its specification, you are not able to assign types to each expression. But what…

> Strongly typed and weakly typed do not seem to have good definitions.

Is strongly typed not “I compiler/runtime guarantee the bytes I read adhere to type T”?

Re: TypeScript 7

#94
post #17

Earlier quoted context omitted.

I don't think ... serious people... argued that. That's a bit hyperbolic so I'm sure I'm wrong, but I have an ace: if you point me at very smart people who argued against types I'm gonna say that they weren't serious. I think it's not possible, if you have the relevant experience of working on both typed and untyped codebases of at least moderate complexity with at least one collaborator, to come away seriously belie…

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…

This isn't a good example at all. Those interfaces are subtypes.

Re: TypeScript 7

#95
post #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.

It's maybe a bit of a startup-world, HN-blinkered assessment...but that's where we're talking, isn't it?

Even before JS became the language for everything, there was a good chunk of time - maybe between 2005 and 2015? - when Python and Ruby were dominant in this environment, and this dismissive attitude towards static typechecking was similarly dominant.

Of course in the enterprise space everyone was using Java, and in the systems space or game dev space everyone was using C++. But those worlds get a lot less airtime here.

Plus everyone on HN is a good little pg disciple, and Lisp is dynamically typed. If the One True Language doesn't need static typechecking (though SBCL offers some very helpful heuristics) surely it's not worth it. Right? Right?

Re: TypeScript 7

#96
post #91

After running out of Fable credits in a day on my max plan I started looking around for ways to trim down my token usage and came to the realization that all of the type spaghetti that opus wrote is probably eating up like 50-70% of my tokens. A clean django project is probably 3-4x less code than the equivalent TS based service. It made me consider dropping strict mode and defaulting to js for most simple things.

Interesting, I've come to the opposite conclusion: a lack of types (or types that are only weakly enforced) costs me significantly more tokens in the long-run to maintain, and makes it far too easy for models to silently introduce bugs.

I run all my projects now in TypeScript with the strictest possible settings, including disabling `ts-ignore` markers.

(This would drive me absolutely insane, but my agents get over it pretty quickly!)

Re: TypeScript 7

#97
post #23

Earlier quoted context omitted.

dhh is still not very fond of it. To each their own. https://world.hey.com/dhh/turbo-8-is-dropping-typescript-701...

> TypeScript just gets in the way of that for me. Not just because it requires an explicit compile step, but because it pollutes the code with type gymnastics that add ever so little joy to my development experience, and quite frequently considerable grief. Things that should be easy become hard, and things that are hard become `any`. No thanks! That comment is expected by a Ruby enthusiast, which is arguably one of…

I'm a Ruby enthusiast - Sorbet is one of the best things since sliced bread to happen to the ecosystem. matz is pushing hard on static typing as part of the standard Ruby ecosystem as well.

Re: TypeScript 7

#98
post #91

After running out of Fable credits in a day on my max plan I started looking around for ways to trim down my token usage and came to the realization that all of the type spaghetti that opus wrote is probably eating up like 50-70% of my tokens. A clean django project is probably 3-4x less code than the equivalent TS based service. It made me consider dropping strict mode and defaulting to js for most simple things.

Why not just do like.. actual engineering, and stay in control of what the LLM builds?

Re: TypeScript 7

#99

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

Because it’s easier to work with one main language if you can get away with it.

Re: TypeScript 7

#100
post #91

After running out of Fable credits in a day on my max plan I started looking around for ways to trim down my token usage and came to the realization that all of the type spaghetti that opus wrote is probably eating up like 50-70% of my tokens. A clean django project is probably 3-4x less code than the equivalent TS based service. It made me consider dropping strict mode and defaulting to js for most simple things.

In a world where code generation is cheap, why use untyped languages? Types add confidence, stricter interfaces, and most likely a better runtime performance.
Post reply on HN