Should Haskell also provide unrestricted side effects, setjmp/ longjmp, missile launching functions, etc? After all, people who don't want to use them can just avoid them. :)

On Nov 15, 2006, at 05:07 , Neil Mitchell wrote:

Hi

Yes, these techniques are fairly well known now, and hopefully some of
the more experienced Haskellers are using them (I certainly use the
non-empty list tricks). Any anyone with more than 6 months Haskell knows
to avoid fromJust.

I'm not, I use fromJust all the time. Ditto for head, init, maximum, foldr1...

One solution would be to deprecate fromJust (we recently decided not to add fromLeft/Right for the same reasons). Having a compiler warning is a
good way to encourage good behaviour :)

We didn't decide not to add fromLeft/fromRight, Russell decided to
defer it to a later patch. I am still very interested in them being
put in!

There seem to be two sides forming to this issue - use partial
functions or don't. I don't see why we should restrict the functions
available to the partial people, when the unpartial people can choose
not to use them.

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to