forall vs. exists
Hal Daume III
hdaume@ISI.EDU
Thu, 17 Apr 2003 09:38:31 -0700 (PDT)
I tend to agree with this (I was just waiting for someone to express this
viewpoint, so I would have less typing to do). I agree that explaining
this difference to a nonuser is often nontrivial, but after a few months
and some deliberation, it's started to make sense to me :).
That said, if adding 'exists' to the data constructor is a precursor to
having existential types that aren't datatypes, then I'm completely in
favor of it :).
- Hal
--
Hal Daume III | hdaume@isi.edu
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Thu, 17 Apr 2003, George Russell wrote:
> 1) The problem is basically whether you regard the type constructor
> as a way of constructing a type or of taking it apart.
> So using the current notation
>
> data A = forall x . B x => C x
>
> forall seems sensible if you think of a constructor as a way of
> constructing a type (for all x that's a B, C gives you an A), but
> not if want to take it apart, where your attitude is
> (there exists an x that's a B that's inside this C).
>
> I really can't see any reason for preferring the viewpoint of the
> constructor to the destructor, or vice-versa. So my vote would be for
> keeping things as they are.
>
> 2) I currently existential datatypes 17 times or thereabout. Replacing
> "forall" by "exists" through all these would be annoying, but not take
> very long. Also there seem to be two modules which use the variable name
> "exists", but while having to replace that would be annoying, again it
> wouldn't take very long. Altogether perhaps 20 minutes, if that.
> So while the suggested change-over would be a pain, it wouldn't be a major
> pain.
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>