caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yaron Minsky <yminsky@janestreet.com>
To: Malcolm Matalka <mmatalka@gmail.com>
Cc: Leo White <leo@lpw25.net>, "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Are implicit modules too implicit?
Date: Wed, 2 Mar 2016 09:17:17 -0500	[thread overview]
Message-ID: <CACLX4jS-CtfTehfu=eoNCyX3Bu+GtPTN=8oH5RSdVeQ83sayvQ@mail.gmail.com> (raw)
In-Reply-To: <8637s9gev3.fsf@gmail.com>

I think the library design issues with implicits are still quite open.
Our intent with Core is to step pretty gradually into this area.  I
expect that some things like sexp-conversion will be moved to
implicits pretty eagerly, but that we'll be quite cautious for a
while.

It's worth noting that modules must in this proposal be marked
explicitly to be available for implicit selection.  So you can grep
for implicit modules to some degree at least.

My guess is that with respect to Core, we'll end up in a state where
implicits are used in a quite limited manner.  I think they'll be
quite useful, but I don't expect to have many kinds of implicits
floating around in the scope by default.

y

On Wed, Mar 2, 2016 at 8:59 AM, Malcolm Matalka <mmatalka@gmail.com> wrote:
> Leo White <leo@lpw25.net> writes:
>
>>> To me, this means going from a call-site, to the actual
>>> implementation is very difficult especially since I cannot even do some
>>> sort of grep to find all those things that implement an implicit module
>>> type.
>>
>> The best way of finding a variable's definition is to use merlin to jump to definition.
>> The same will be true for implicit call sites.
>
> In this case I'm interested in if I have a block of code like the
> [print] function described in the paper knowing what possible code could
> even be executed there and how to define its definition.  For example,
> how do I go from [show 5] to the module [Show_int]?
>
>>
>> Depending on how libraries are designed I would not expect it to be difficult to locate
>> the instances by hand. They are managed with the same scoping mechanisms as
>> ordinary values, and since they should rarely be used by name they can also be
>> given nice descriptive searchable names.
>
> In the paper, the Show implementation for an int is called Show_int and
> for list Show_list, etc.  But this is just a pleasant convention in the
> paper.  What if implicit modules required specifying what module type
> they are implementing?  That would make finding instances of Show
> easier.  How this would look is in the paper:
>
> implicit module Foo : Show = struct ... end
>
> Certainly this isn't needed for correctness, but it seems nicer than
> hoping people name their instances something sensible.
>
> Do you have any thoughts on how you think implicit modules would effect
> understanding a large application?
>
>>
>> Regards,
>>
>> Leo
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  reply	other threads:[~2016-03-02 14:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 12:16 Malcolm Matalka
2016-03-02 13:37 ` Leo White
2016-03-02 13:59   ` Malcolm Matalka
2016-03-02 14:17     ` Yaron Minsky [this message]
2016-03-02 14:24     ` Leo White
2016-03-02 15:57       ` Malcolm Matalka
2016-03-02 18:59         ` Gabriel Scherer
2016-03-02 14:30   ` Gerd Stolpmann
2016-03-02 15:09     ` Leo White

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='CACLX4jS-CtfTehfu=eoNCyX3Bu+GtPTN=8oH5RSdVeQ83sayvQ@mail.gmail.com' \
    --to=yminsky@janestreet.com \
    --cc=caml-list@inria.fr \
    --cc=leo@lpw25.net \
    --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;
as well as URLs for NNTP newsgroup(s).