Live data from Hacker News

Ten Years of TypeScript

devblogs.microsoft.com

141–147 of 147 posts

Re: Ten Years of TypeScript

#141

I overall like TypeScript. But one thing I have encountered in every TypeScript codebase I've worked on are types with a crazy amount of optional properties like this: type Foo = { prop1?: number; prop2: string; prop3?: boolean }; I'm sure there is some value to having this than not having it at all, but I find it hilarious the amount of times I'm writing TypeScript that I can't even trust the types given to me. Of c…

Sounds like a shitty function. Count your lucky stars it's at least statically typed! TS unfortunately can't solve people not understanding the benefits of a type system as it pertains to foundational design - they have to learn that on their own.

Re: Ten Years of TypeScript

#142

Honest question: why did TypeScript succeed while ActionScript 3.0, another ECMAScript-superset language with typing and OOP (and predates TS by a few years), is all but a distant memory? Is it more than just Adobe being a terrible steward of its tech? With that said, TS is definitely a blessing; I recently had the privilege of migrating to it after having written a hobby project in plain JS, and the difference in us…

Did ActionScript transpile to Javascript? Regardless of whether it did or not, the ES4 trainwreck is probably a big part of the reason.

Re: Ten Years of TypeScript

#143
post #93

Earlier quoted context omitted.

I wished Flow or ReScript would have won. TypeScript is too C#-ish for my taste. Well, still better than nothing, I guess.

Look at the Typescript repo itself. Very much not like C#. Frameworks like Angular use it very much like c# though.

Yes, it's an okay-ish language.

Often bette than pure JavaScript, which is also an okay-ish language.

So, I think, overall we're better off

Re: Ten Years of TypeScript

#144

I overall like TypeScript. But one thing I have encountered in every TypeScript codebase I've worked on are types with a crazy amount of optional properties like this: type Foo = { prop1?: number; prop2: string; prop3?: boolean }; I'm sure there is some value to having this than not having it at all, but I find it hilarious the amount of times I'm writing TypeScript that I can't even trust the types given to me. Of c…

Sounds like a shitty function. Count your lucky stars it's at least statically typed! TS unfortunately can't solve people not understanding the benefits of a type system as it pertains to foundational design - they have to learn that on their own.

Amen!

Re: Ten Years of TypeScript

#145
post #37

Honest question: why did TypeScript succeed while ActionScript 3.0, another ECMAScript-superset language with typing and OOP (and predates TS by a few years), is all but a distant memory? Is it more than just Adobe being a terrible steward of its tech? With that said, TS is definitely a blessing; I recently had the privilege of migrating to it after having written a hobby project in plain JS, and the difference in us…

I liked AS3 quite a bit, but it was limited to Adobe products. I don’t think it was ever given a chance to make an impact beyond Flash and Air.

If you liked AS3, maybe take a look at Haxe.

Re: Ten Years of TypeScript

#147

Earlier quoted context omitted.

I’m curious what you’re distinguishing here. To me a type system and a contract system are identical concepts with different descriptions. It seems like you might be highlighting the structural typing aspects of TypeScript’s type system versus nominal or concrete types in many others, but that’s been clear for most TS usage for since well before `satisfies` so I’m not sure if my interpretation is right.

For a start: https://en.m.wikipedia.org/wiki/Design_by_contract

Hey dude. Hijacking this thread cuz I cannot reply on https://news.ycombinator.com/item?id=32804400 any longer. ;)

Good call on Sour Grapes though. I had thought you meant that one. I also reallllly enjoyed it!

Post reply on HN