From: Ivan Gotovchits <ivg@ieee.org>
To: Malcolm Matalka <mmatalka@gmail.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Should you always use GADTs?
Date: Tue, 29 Mar 2016 07:26:38 -0400 [thread overview]
Message-ID: <CALdWJ+x6Ra2wX6V0zbUzoZ6EtfEAD_8m-oNyZsfkZyzHQZ0j1w@mail.gmail.com> (raw)
In-Reply-To: <CAKziXDVCiDzEUjvxqWhD-V6FOVMHwY7gsTd09j4FubkuGPTADQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]
One particular practical reason:
# type t = Int : int -> t | Float : float -> t [@@deriving bin_io, compare,
sexp];;
Characters 22-23:
type t = Int : int -> t | Float : float -> t [@@deriving bin_io, compare,
sexp];;
^
bin_write_sum: GADTs are not supported by bin_prot
I'm not sure whether it is a real limitation, or it can be fixed, but so
far there is a difference.
On Tue, Mar 29, 2016 at 6:08 AM, Malcolm Matalka <mmatalka@gmail.com> wrote:
> I've been learning about GADTs this weekend and I'm wondering if there is
> any reason to not use them all the time? Or put another way, should Ocaml
> have non generalized variants at all (tossing aside the legacy code thing)?
>
[-- Attachment #2: Type: text/html, Size: 1369 bytes --]
prev parent reply other threads:[~2016-03-29 11:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 10:08 Malcolm Matalka
2016-03-29 11:26 ` Ivan Gotovchits [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALdWJ+x6Ra2wX6V0zbUzoZ6EtfEAD_8m-oNyZsfkZyzHQZ0j1w@mail.gmail.com \
--to=ivg@ieee.org \
--cc=caml-list@inria.fr \
--cc=mmatalka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox