[ghc-steering-committee] #380 GHC2021: Let's deprecate ExistentialQuantification
Eric Seidel
eric at seidel.io
Fri Dec 4 13:31:43 UTC 2020
I do use ExistentialQuantification on occasion, but mainly because I'm used to it and don't often use GADT syntax. I'm not strongly attached to it, in fact now that you spelled out the GADT version
> data Dyn where
> MkDyn :: forall a. Typeable a => a -> Dyn
I think that makes the existential quite a bit clearer, so I might start using it :)
On Fri, Dec 4, 2020, at 08:22, Spiwack, Arnaud wrote:
> Dear all,
>
> ExistentialQuantification is one of the extensions that we are
> considering adding to GHC2021.
>
> ExistentialQuantificaton enables the following syntax:
>
> `data Dyn = forall a. Typeable a => MkDyn a
> `
> Has any of us actually used this syntax in recent years? I, personally,
> only use the equivalent GADT syntax
>
> `data Dyn where
> MkDyn :: forall a. Typeable a => a -> Dyn a
> `
> It’s barely more verbose, and it’s less quirky.
>
> Besides, the GADT syntax is there to stay (and GADTSyntax at the very
> least, is one of these extensions where there seems to be no doubt will
> be in GHC2021).
>
> I’d say there is such a thing as too much syntax. And, in my view, the
> GADT syntax makes the ExistentialQuantification syntax redundant. I’d
> much rather we didn’t add it in the defaults so that it can be on its
> slow path to deprecation.
>
> /Arnaud
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
More information about the ghc-steering-committee
mailing list