On Tue, Jun 23, 2009 at 8:28 PM, Brandon S. Allbery KF8NH < allb...@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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe