[Haskell-cafe] Language extensions [was: Memoization]

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun May 27 09:51:43 EDT 2007


On May 27, 2007, at 9:19 , Andrew Coppin wrote:

> So... ∀x . P means that P holds for *all* x, and ∃ x . P means  
> that x holds for *some* x? (More precisely, at least 1 possible  
> choice of x.)

Exactly.

> Seriously. Haskell seems to attract weird and wonderful type system  
> extensions like a 4 Tesla magnet attracts iron nails... And most of  
> these extensions seem to serve no useful purpose, as far as I can  
> determine. And yet, all nontrivial Haskell programs *require* the  
> use of at least 3 language extensions. It's as if everyone thinks  
> that Haskell 98 sucks so much that it can't be used for any useful  
> programs. This makes me very sad. I think

Which ones?  The only one that comes to mind is hierarchical  
libraries, which are a Good Thing --- the H98 flat namespace becomes  
increasingly restrictive as Haskell gains more libraries (both  
included ones, and from e.g. Hackage.)

Keep in mind also that many of these extensions are part of Haskell  
Prime, which last I checked is supposed to become official sometime  
later this year.

> Haskell 98 is a wonderful language, and it's the language I use for  
> almost all my stuff. I don't understand why people keep trying to  
> take this small, simple, clean, elegant language and bolt huge,  
> highly complex and mostly incomprehensible type system extensions  
> onto it...

Experimentation.  There are things you can't do with straight Haskell  
98 (even something as simple as the State monad benefits from  
functional dependencies; but fundeps are troublesome enough that  
associated types are being explored as a cleaner alternative).

Haskell's in kind of a strange position, being simultaneously a  
research language and a language which is useful in the "real  
world".  The tension between these is one reason why there are  
standards (H98 and the upcoming H'):  we "real world" types write to  
H98 or H' (increasingly the latter), while the researchers play with  
type system extensions and the like.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list