[Haskell-cafe] Comments from OCaml Hacker Brian Hurt

Jonathan Cast jonathanccast at fastmail.fm
Sun Jan 18 00:45:56 EST 2009


On Sat, 2009-01-17 at 11:07 +0000, Andrew Coppin wrote:
> Anton van Straaten wrote:
> > Niklas Broberg wrote:
> >>> I still think existential quantification is a step too far though. :-P
> >>
> >> Seriously, existential quantification is a REALLY simple concept, that
> >> you would learn week two (or maybe three) in any introductory course
> >> on logic. In fact, I would argue that far more people probably know
> >> what existential quantification is than that know what a monoid is.
> >> :-)
> >
> > Andrew's core objection here seems reasonable to me.  It was this:
> >
> > > {-# LANGUAGE ExistentialQuantification #-} is an absurd name and
> > > should be changed to something that, at a minimum, tells you it's
> > > something to do with the type system.
> >
> > But I suspect I part company from Andrew in thinking that something 
> > like ExistentiallyQuantifiedTypes would be a perfectly fine alternative.
> 
> I would suggest that ExistentiallyQuantifiedTypeVariables would be an 
> improvement on just ExistentialQuantification - but I'd still prefer the 
> less cryptic HiddenTypeVariables. (Since, after all, that's all this 
> actually does.)

Consider the expression (I hate this expression)

  case error "Urk!" of
    x -> error "Yak!"

When you translate this into System F, you have to come up with a fresh
type variable for the type of x, even though that variable is unused in
the type of the entire expression.

Which is what HiddenTypeVariables brings to my mind every time you use
it.

jcc




More information about the Haskell-Cafe mailing list