Forward compatibility (was Re: [Haskell-cafe] GHCi infers a type but refuses it as type signature)

Luke Palmer lrpalmer at gmail.com
Wed Jun 24 05:26:09 EDT 2009


On Tue, Jun 23, 2009 at 8:28 PM, Brandon S. Allbery KF8NH <
allbery at ece.cmu.edu> wrote:

> On Jun 23, 2009, at 05:20 , Luke Palmer wrote:
>
> obsolete now, will your code still work when they are gone?  Will it still
> work when the typeclass resolution algorithm is obsoleted by a superior
> algorithm (I'm looking at you, Oleg! :-)?  When Haskell is obsolete, how
> hard will it be to port?
>
>
> This is the point at which 99% of programmers throw up their hands at the
> futility of trying to guess what lies 20 years in the future, and just
> writes the fscking code.  I mean, you've just ruled out both Haskell98 *and*
> Haskell-with-extensions.
>

What?  I didn't mean to.

In case I wasn't clear enough, by the typeclass algorithm, I mean the
algorithm for inference with typeclasses -- the semantics would be the
same.  Many of Oleg's famous hacks are sensitive to the specific way GHC
searches for instances, which I did intend to rule out.

And "how hard will it be to port" is about the essence of the code.  I'm
trying to rule out code which is not correct and meaningul at its heart, but
which may rely on syntactic tricks (eg. printf emulation, "Monads" which
don't satisfy the laws just for the notation, ...), or operational tricks
such as unsafeInterleaveIO.  Code that has an air of a  mathematical model
is much more likely to be portable.

I think typical Haskell code will end up having a much longer life than
typical C code, even if Haskell dies when C is still in use.  But a small
fraction Haskell code is *just* Haskell code, and I try not to write that
kind.  Really, such mindfulness is a lot easier than it sounds, because we
are using such a beautiful, essentially simple language.

Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090624/59ae45c0/attachment.html


More information about the Haskell-Cafe mailing list