There is a very short list of things I wish @typescriptlang did differently, but at the top, and by a mile is: embracing soundness as an explicit goal.
Soundness empowers developers to be productive, especially in the long life of a project: it’s a super-power for *refactoring*.
-
-
It's hard to appreciate how much associated types clean up code. The impact would be enormous (as a thought experiment, imagine Rust without associated types)
-
I can imagine all the hackish things we'd have to do just to get things work as if we had them.
-
I’m jazzed to see what happens as we land generic associated types. Should unlock an awful lot of interesting things.
-
I have a real nice FSM pattern I want to try with that and impl Trait in Trait
-
What do you mean by FSM? (I can’t read that and come up with anything but “Flying Spaghetti Monster.”
) -
Finite State Machine?
-
Yes, that, there we go. It is definitely Friday night.

-
Also I may or may not be over here building out as small as possible a reproduction for a place where TS’ type system just… gives up. It actually *behaves* like Rust’s not having traits in scope problem, in that it fails to resolve a given type without import. But no error.
End of conversation
New conversation -
-
-
Have you tried branded types as a replacement for nominal types?
-
I have. It doesn't work for primitives, and adds annoying complexity for object types in a lot of cases.
-
But primitives are the real problem.
-
Tweet unavailable
-
Slightly better lying by hiding fakes with private fields and somewhat better readability / usability: https://goo.gl/LAjorX
End of conversation
New conversation -
-
-
If TypeScript enforces equality of types nominally it will break so many things. Specially in definitely typed. Maybe a new syntax is needed. I'm in favor of the idea. We should ask
@ahejlsberg -
I mean as an opt-in, like in Flow.
End of conversation
New conversation -
-
-
What do u want to see for errors specifically? We have been talking about some improvements but would love to hear what you have in mind.
-
The experimental `pretty` mode is a great step in the right direction formatting. You all should run with it. But also: imitate Rust and Elm not only in the formatting but also in the care to make sure the error is clear and helps the user solve the problem.
-
Do u have specific examples in mind?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.