News for hackers. Stuff that matters.
Re:Why doesn't TypeScript properly type Object.keys? by valenterry on Saturday June 24, 2023 @10:05AM (#36458786)
Interesting, I think it indeed falls under "emit different code based on the results of the type system" even though - thank you for the link.

I'm not sure if there is a) any "programming pattern" that can avoid this without other drawbacks and b) if there is any problem with emitting different code based on the types (at compiletime).

I suppose it could lead to breaking behaviour if the typesystem is changed, since it now can impact runtime code. Personally, I think this would be more than worth it, but maybe the typescript team has a different opinion or other reason.

There are no comments on this comment yet.