[Haskell-cafe] Python is lazier than Haskell

Ertugrul Soeylemez es at ertes.de
Fri Apr 29 12:10:17 CEST 2011


Chris Smith <cdsmith at gmail.com> wrote:

> > > Sometimes I wish for a -fphp flag that would turn some type errors
> > > into warnings. Example:
> > >
> > > v.hs:8:6:
> > >     Couldn't match expected type `[a]' against inferred type `()'
> > >     In the first argument of `a', namely `y'
> > >     In the expression: a y
> > >     In the definition of `c': c = a y
> > >
> > > GHC could substitute 'y = error "Couldn't match expected type
> > > `[a]' against inferred type `()'"' and compile anyway.
> > >
> > > Would that bring Haskell closer to Python?
> >
> > It would make people abuse that feature.  I don't want it.
>
> I do, particularly in GHCi.  I don't mind if Haskell refuses to build
> a binary, but having to comment out coded in order to load bits in
> GHCi is definitely a pain.

I wonder why I don't have to do that.  You may be thinking in a
different language.  With the semantics of Haskell also comes a certain
programming style, I think.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/





More information about the Haskell-Cafe mailing list