caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Boom <hendrik@topoi.pooq.com>
To: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Warnings opening modules (was: why is building ocaml hard?)
Date: Fri, 15 Jul 2016 15:44:07 -0400	[thread overview]
Message-ID: <20160715194407.GB1998@topoi.pooq.com> (raw)
In-Reply-To: <0017d57b-7316-c5a8-87fc-db297d8fbb20@lexifi.com>

On Fri, Jul 15, 2016 at 08:50:25PM +0200, Alain Frisch wrote:
> On 15/07/2016 18:57, Yotam Barnoy wrote:
> >The problem seems to stem from the fact that the same open statements
> >which we use to import code (and which are available in every
> >language) are also used as part of OCaml's super-flexible module
> >system. This makes it hard to come up with easy, simple shortcuts for
> >functionality available in other languages, because it needs to fit in
> >the far more complex general module language.
> 
> There would really be no difficulty to allow specifying which components to
> bring in scope in an "open" statement.  One just need to decide if it is a
> good idea from a language design point of view, and then agree on / fight
> over a syntax.  (One needs to distinguish of course between various kinds of
> components.)

Modula 3 does it this way, and allows you to rename on import.
It also allows you to just import an emtire module, but then you have 
to mention the name of the module every time you use the something it 
provides.

It has no promiscuous 'give me whatever'.

It works.  And it's usually easy to find where something is defined.

Except for methids of object types.  Identifying the particular 
function being called then depends on run-time information.  That's 
inherent to inheritance and overriding.

-- hendrik


  reply	other threads:[~2016-07-15 19:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-10 11:57 David Allsopp
2016-07-10 19:45 ` Gerd Stolpmann
2016-07-13 12:08   ` David Allsopp
2016-07-13 12:20     ` Gerd Stolpmann
2016-07-13 12:30       ` David Allsopp
2016-07-14  9:03     ` Goswin von Brederlow
2016-07-15  9:52       ` David Allsopp
2016-07-15 16:13         ` Hendrik Boom
2016-07-15 16:57           ` Yotam Barnoy
2016-07-15 18:09             ` Jeremy Yallop
2016-07-15 18:26               ` Hendrik Boom
2016-07-15 18:58               ` Yotam Barnoy
2016-07-15 19:26                 ` Hezekiah M. Carty
2016-07-15 19:42                   ` Yotam Barnoy
2016-07-15 19:52                     ` Jeremy Yallop
2016-07-15 20:25                       ` Yotam Barnoy
2016-07-15 18:50             ` Alain Frisch
2016-07-15 19:44               ` Hendrik Boom [this message]
2016-07-15 17:04           ` Gerd Stolpmann
2016-07-20  7:49             ` Louis Gesbert
2016-07-16  7:40           ` Petter A. Urkedal
2016-07-16  9:58             ` vrotaru.md
2016-07-19 16:37               ` Yotam Barnoy

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=20160715194407.GB1998@topoi.pooq.com \
    --to=hendrik@topoi.pooq.com \
    --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;
as well as URLs for NNTP newsgroup(s).