[Haskell-cafe] Idea for hackage feature

Mitar mmitar at gmail.com
Thu Sep 16 02:04:36 EDT 2010


Hi!

I just got an idea for hackage feature. All functions/modules listed
there could have some mark if they or any function/module they use
uses an unsafe* function. Of course this will make probably almost
everything marked as unsafe, but this is the idea - to raise awareness
about that so that you can prefer some function/implementation over
another.

Of course marking/tagging everything as unsafe is not really useful.
Because of this I propose that then community votes/vouches on
correctness/stability of implementations and this would then influence
the how unsafe given function really is (or is according to community,
if we are more precise). Of course it would be even better that every
function using unsafe would have also a formal proof but as we cannot
believe that we will prove everything in a feasible feature we could
maybe opt for such "crowd intelligence" approach. We cannot have a
Turing machine, but maybe we can have crowd. ;-)

(Of course low number of found bugs and good unit test code coverage
can then positively influence crowd, so authors would be motivated to
assure that.)

Comments? Opinions?

Because I really hate that I try to keep my code pure and separate IO
from everything else and then somewhere deep in there some unsafe*
lurks. (Ah, yes, a side effect of this tagging/marks would be also
that you would be able to see where all those unsafe* calls are for a
given function, so you would be able to fast jump (with link) to a
given line in code and evaluate circumstances in which that unsafe*
call is made. And then vote/vouch once you discover that it is
probably pretty safe.)


Mitar


More information about the Haskell-Cafe mailing list