From: Jordan W <jordojw@gmail.com>
To: Leo White <lpw25@cam.ac.uk>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Module aliases ideal name-spacing
Date: Sun, 28 Dec 2014 15:25:17 -0800 [thread overview]
Message-ID: <CAPOA5_6gZ7b8-DRS=YCaDWU2UAbWjvfG=09SOXzPiQSFNmbeng@mail.gmail.com> (raw)
In-Reply-To: <874msflb48.fsf@study.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
Oh, I missed that detail. That actually could work quite nicely. Though
it's a bit of a messy build script, it's something we could write
generically to work well on any "project". The only remaining remnant of
the "prefixed" namespace is in myLib.mli/.ml
module MyModule = MyLibMyModule
module Utils = MyLibUtils
It would be nice to eliminate that as well, but I could imagine
auto-generating these module alias mappings. This sounds like a nice
workaround the namespace issue, but do you think it would be worth
supporting module aliases themselves as a form of namespacing at
compilation time, so that this intermediate prefixed compilation artifact
isn't needed?
Thank you for the help,
J
On Sun, Dec 28, 2014 at 1:26 PM, Leo White <lpw25@cam.ac.uk> wrote:
> Jordo <jordojw@gmail.com> writes:
>
> > Thank you for the reply, Leo. One of the requirements was that
> developers be able to name their internal modules as they
> > see fit without having to fear naming collisions. It's also required
> that file names correspond directly to module names
> > (or at least we retain the capability to do so). It appears in this
> solution you suggested, developers still must prefix
> > their file names in order to avoid collisions.
>
> None of the source files have prefixed names, only intermediate files
> (that is why you use `-o`). For both reading the source code and using
> the library through `MyLib.Foo`, the prefix does not appear.
>
> Regards,
>
> Leo
>
[-- Attachment #2: Type: text/html, Size: 2189 bytes --]
next prev parent reply other threads:[~2014-12-28 23:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-27 23:04 Jordan W
2014-12-28 18:15 ` Leo White
2014-12-28 20:34 ` Jordo
2014-12-28 21:26 ` Leo White
2014-12-28 23:25 ` Jordan W [this message]
2014-12-29 0:14 ` Leo White
2015-01-07 15:15 ` Goswin von Brederlow
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='CAPOA5_6gZ7b8-DRS=YCaDWU2UAbWjvfG=09SOXzPiQSFNmbeng@mail.gmail.com' \
--to=jordojw@gmail.com \
--cc=caml-list@inria.fr \
--cc=lpw25@cam.ac.uk \
/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