[Haskell-cafe] Shooting your self in the foot with Haskell
Jason Dagit
dagit at codersbase.com
Wed Oct 1 18:38:08 EDT 2008
On Wed, Oct 1, 2008 at 3:27 PM, Simon Brenner <olsner at gmail.com> wrote:
> On 10/1/08, John Van Enk <vanenkj at gmail.com> wrote:
> > There's the well known "How to shoot your self in the foot" list which I
> > have it printed and taped on my desk at work.
> >
> > http://www-users.cs.york.ac.uk/susan/joke/foot.htm
> >
> > I had a co-worker ask me how you'd shoot your self in the foot with
> > Haskell. Here's the best I could do:
> >
> > "You shoot the gun, but the bullet gets trapped in the IO monad."
>
> While compiling your program the compiler produces a type error long
> enough to overflow a kernel buffer, overwrite the trigger control
> register and shoot you in the foot.
>
> or
>
> After trying to decipher the type errors from the compiler, your head
> explodes.
Or as GHC says:
My brain just exploded.
And of course it says that because:
I can't handle pattern bindings for existentially-quantified
constructors.
Instead, use a case-expression, or do-notation, to unpack the
constructor.
But, telling people that part takes the fun out of :)
>
>
> or
>
> After you've finally found a way to circumvent the type system and
> shoot yourself in the foot, Oleg appears out of nothing and shoots you
> in the foot for coming up with it before him.
Heh. Nice. Oleg has earned himself the Haskell equivalent of a Chuck
Norris reputation. Except that Oleg has really earned the respect he gets
from our teasing. BTW, is there an Oleg Facts website?
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081001/53f63393/attachment-0001.htm
More information about the Haskell-Cafe
mailing list