This actually makes top-down development more natural too, I guess... You want prog A, you write A :: Type_A then you decide that probably A = B.C where B :: Type_B, C :: Type_C, etc. You don't actually have to code it top-down (although you can if you want) - you can code the easy bits first, making the assumption that you'll be able to find/write functions to fit the other bits of the spec.
Once this mindset is adopted, hoogle suddenly seems much more powerful and useful. The first thing you think about a problem is the type. You enter that type into hoogle, and it tells you that someone's already done it. Sorted ;)
...anyway, my hope is that there is a connection between this type/data first approach to programming, and a willingness to let the compiler provide the guarantees it can, without worrying about how. My further hope is that by learning to adopt this approach and that mindset at will, one can learn to co-exist peacefully (in fact - productively!) with the haskell type system - and actually feel the benefit it can provide.
I know that I've written these thoughts down rather clumsily, and I know that to type or not to type is a religious issue, so I hope I haven't annoyed anyone. Perhaps I'll take some time at a later date to try to write this all more clearly....
no subject
This actually makes top-down development more natural too, I guess... You want prog A, you write A :: Type_A then you decide that probably A = B.C where B :: Type_B, C :: Type_C, etc. You don't actually have to code it top-down (although you can if you want) - you can code the easy bits first, making the assumption that you'll be able to find/write functions to fit the other bits of the spec.
Once this mindset is adopted, hoogle suddenly seems much more powerful and useful. The first thing you think about a problem is the type. You enter that type into hoogle, and it tells you that someone's already done it. Sorted ;)
...anyway, my hope is that there is a connection between this type/data first approach to programming, and a willingness to let the compiler provide the guarantees it can, without worrying about how. My further hope is that by learning to adopt this approach and that mindset at will, one can learn to co-exist peacefully (in fact - productively!) with the haskell type system - and actually feel the benefit it can provide.
I know that I've written these thoughts down rather clumsily, and I know that to type or not to type is a religious issue, so I hope I haven't annoyed anyone. Perhaps I'll take some time at a later date to try to write this all more clearly....