4 ms·
Some really interesting points in here. >So I guess I wish there was a tool with which I could manage type information in the program in a lot more dynamic way
by clusmore 10y ago
Some really interesting points in here.
>So I guess I wish there was a tool with which I could manage type information in the program in a lot more dynamic way than I currently do.
I write a small amount of Haskell for personal projects and I always use type annotations for top-level definitions for two reasons. 1) I write them in advance because it helps me think about what I'm doing, and 2) I like that the compiler will tell me if I accidentally change the type between successive compilations. If it weren't for the first point though, I can imagine it would be nice to omit the type signatures and then have the compiler not only infer them for me but actually place them into the source code to save itself the trouble next time whilst improving my documentation. If it could do that, the logical next step would be to have another tool to strip out all the type signatures, to give you that design-time dynamic feeling whilst still being very much static at compile time. You can refactor all you want changing signatures and the compiler will put them all back in again when you're done.