From: brogoff <brogoff@speakeasy.net>
To: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] cyclic types
Date: Sat, 29 Jan 2005 21:56:53 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0501292148270.12148@shell3.speakeasy.net> (raw)
In-Reply-To: <1F350A61-7250-11D9-866D-000D9345235C@inria.fr>
On Sun, 30 Jan 2005, Damien Doligez wrote:
> On Jan 29, 2005, at 18:33, Radu Grigore wrote:
> > Can you give an example of why rectypes by default is dangerous?
>
> IIRC, rectypes are off by default because they trade a small increment
> in expressive power for a large degradation of the intelligibility of
> type-checking error messages. I don't think they are dangerous in the
> sense of breaking the type system.
Right, that's what I meant. They certainly don't break the type system.
There was a fairly lengthy discussion of this topic about 5 years ago, but
since browsing the archives now is a lot harder than when I started, I'll let
someone else dig up the pointer.
In almost all cases, you can achieve the effect of -rectypes by introducing
an extra constructor.
I think the degradation in intelligibility you mention is only in the case of
-rectypes being the default. If (optional) type annotations could drive the
inference, I think we'd have the best of both worlds. It seems like
FPL type systems are going to have to move in the direction of the more
programmer supplied annotations anyways.
-- Brian
next prev parent reply other threads:[~2005-01-30 5:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-29 12:15 Radu Grigore
2005-01-29 12:34 ` Radu Grigore
2005-01-29 13:42 ` [Caml-list] " Remi Vanicat
2005-01-29 17:12 ` brogoff
2005-01-29 17:33 ` Radu Grigore
2005-01-29 23:47 ` Damien Doligez
2005-01-30 5:56 ` brogoff [this message]
2005-01-30 6:05 ` Radu Grigore
2005-01-30 7:19 ` William Lovas
2005-01-30 10:33 ` Xavier Leroy
2005-01-30 11:44 ` sejourne_kevin
2005-02-01 9:27 ` Christophe Raffalli
2005-01-29 21:02 ` skaller
2005-01-30 6:46 ` brogoff
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=Pine.LNX.4.58.0501292148270.12148@shell3.speakeasy.net \
--to=brogoff@speakeasy.net \
--cc=caml-list@inria.fr \
/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