3 ms·
Yes, and it would be nice if the compiler could produce such an annotated version automatically, instead of the programmer having to use the highly error-prone
by jsprogrammer 10y ago
Yes, and it would be nice if the compiler could produce such an annotated version automatically, instead of the programmer having to use the highly error-prone technique of typing it all out manually.
For a single function it's not a bug deal, but if you are migrating 10k lines, I'd view it as a near necessity.
- jdmichal 10y agoSo you want the compiler to automatically generate alias types for every un-typed variable and parameter? I assume you would also want the compiler to (somehow?) infer types that should be the same type and merge them, since otherwise the first step is kind of silly. I'd argue that that's a pretty difficult task, tantamount to inferring programmer intent.
- jsprogrammer 10y agoYes, I want merging, but I imagine there could also be an indication that the merge was automatic and in an IDE setting, I'd expect to be able to easily split out the types, if I want.