[ghc-steering-committee] #380 GHC2021: Let's deprecate ExistentialQuantification
Spiwack, Arnaud
arnaud.spiwack at tweag.io
Fri Dec 4 13:22:48 UTC 2020
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20201204/beaa753b/attachment.html>
More information about the ghc-steering-committee
mailing list