caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Andreas Rossberg <rossberg@mpi-sws.org>
To: Leo White <lpw25@cam.ac.uk>
Cc: David Sheets <sheets@alum.mit.edu>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] First-class Functor Forgetting for Free
Date: Tue, 13 Aug 2013 13:22:59 +0200	[thread overview]
Message-ID: <520A1713.7030708@mpi-sws.org> (raw)
In-Reply-To: <861u5yoo0o.fsf@cam.ac.uk>

On 08/12/2013 06:46 PM, Leo White wrote:
>> Your row variables will inevitably be higher-order, AFAICS.
>
> I don't think they will be. To be higher order wouldn't they need to
> have parameters? I don't see how they could end up with parameters.

Their instantiation would _contain_ type constructors, which makes them 
higher-order. Whether that would be a problem or not I'm not sure 
(probably not as long as these row variables cannot be used in any other 
context). It definitely is an extension over the kind of polymorphism 
OCaml currently supports.


>> I disagree completely. Packages wrap modules, so package types _are_ module types. The point of package types is to
>> embed module types into the core type system, not to create a parallel module type system. I think it would be a real
>> bad idea to invent a separate typing mechanism for this purpose, since that is bound to create complexity, friction, and
>> confusion.
>
> I also disagree completely. Packages wrap modules, so package types
> _wrap_ module types. The core type system provides mechanisms that are
> not available in the module type system. We should not rule out using
> these mechanisms with package types to make then easier to use.
>
> Embeding module types into the core type system should mean allowing the
> mechanisms provided by the core type system to operate on module types,
> not just allowing the core type system to treat module types as
> black-boxes that can be passed around and given back to the module
> system.

I don't follow that line of reasoning. The primary reason why we have a 
two-layered language is that most of the core typing mechanisms simply 
_don't work_ for modules. Packages are a clean way of escaping the 
stratification without mixing up the layers and running into a wealth of 
potential problems.

It's unfortunate enough that programmers need to understand 2 separate 
sublanguages and type systems. Extending that to 2 + 1/2 and blurring 
the boundary with rather subtle and limited mechanisms would seem to 
have a negative net effect on language usability. I'd argue that less is 
more here (as is often the case in language design).

Best,
/Andreas


      reply	other threads:[~2013-08-13 11:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11  1:55 David Sheets
2013-08-11  7:53 ` Andreas Rossberg
2013-08-11 13:29   ` David Sheets
2013-08-11 14:32     ` Andreas Rossberg
2013-08-11 14:58       ` Leo White
2013-08-12 11:01         ` Andreas Rossberg
2013-08-12 11:37           ` Leo White
2013-08-12 12:15             ` Andreas Rossberg
2013-08-12 13:06               ` Leo White
2013-08-12 14:15                 ` Andreas Rossberg
2013-08-12 15:17                   ` Leo White
2013-08-12 16:08                     ` Andreas Rossberg
2013-08-12 16:46                       ` Leo White
2013-08-13 11:22                         ` Andreas Rossberg [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=520A1713.7030708@mpi-sws.org \
    --to=rossberg@mpi-sws.org \
    --cc=caml-list@inria.fr \
    --cc=lpw25@cam.ac.uk \
    --cc=sheets@alum.mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).