caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: [Caml-list] Re: Unimplemented modules as top-level signatures
Date: Thu, 23 Dec 2010 15:47:17 +0000 (UTC)	[thread overview]
Message-ID: <slrnih6ro5.ut5.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <AANLkTimLbfFf-w4KApOKqVRM98zUCrmSACZ8wDmwapPV@mail.gmail.com>

Hello,

On 23-12-2010, Lukasz Stafiniak <lukstafi@gmail.com> wrote:
> Interesting question. Lack of response on the mailing list means
> agreement that this is an OK style?
>

I don't think so. Right now:
1) 3.12 is not yet used by everyone
2) its new features are still studied (at least by me)
3) style is really a matter of taste
4) it is in the language, so no problem using it

So basically, go on, test it and give us your feedback. I doubt there
are thousand people already using this, so you will define yourself
what is right or wrong...

AFAIC, I think it is great and that you should use it.

> On Fri, Dec 17, 2010 at 10:19 AM, Lauri Alanko <la@iki.fi> wrote:
>> A minor annoyance in OCaml is that although you can (and must) put
>> each top-level module into its own file, there is no corresponding
>> mechanism for defining module types on their own: you always have to
>> put a "module type" definition inside another module, which
>> complicates scoping, and with standard tools adds an extra level of
>> indentation to the signature definition.
>>
>> However, with 3.12 there is solution of sorts: write the signature
>> definition in foo.mli without an accompanying foo.ml, and then refer
>> to the signature as "module type of Foo".
>>
>> Is this horrible style? Are there some pitfalls I should be aware of?
>> Or are there better solutions to my desire to avoid nested scoping?
>> Top-level functors would also be nice to have... :)
>
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

Regards,
Sylvain Le Gall


      reply	other threads:[~2010-12-23 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17  9:19 Lauri Alanko
2010-12-23 15:33 ` [Caml-list] " Lukasz Stafiniak
2010-12-23 15:47   ` Sylvain Le Gall [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=slrnih6ro5.ut5.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.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;
as well as URLs for NNTP newsgroup(s).