[ocaml-platform] Followup to Leo's proposal

Yaron Minsky yminsky at janestreet.com
Tue Mar 12 12:30:09 GMT 2013


On Tue, Mar 12, 2013 at 8:27 AM, Yaron Minsky <yminsky at janestreet.com> wrote:
> On Tue, Mar 12, 2013 at 5:55 AM, Anil Madhavapeddy <anil at recoil.org> wrote:
>> On Mon, Mar 11, 2013 at 09:51:59PM -0400, Yaron Minsky wrote:
>>> - TRUSTING NAMESPACES.  When thinking about whether files should be
>>>   able to declare their namespaces, one thing that's worth considering
>>>   is the notion of trust.  The Core library is a particularly closely
>>>   code-reviewed and tested collection of code, and one can feel pretty
>>>   safe that if you use anything inside of Core.Std, you're using a
>>>   pretty trustworthy piece of code.
>>>
>>>   On the other hand, Core_extended.Std is less closely reviewed, and
>>>   I would want to avoid it for many trusted applications.  Within Jane
>>>   Street, this is easy for us to manage: we have clear control at the
>>>   build-system level of what goes into Core.Std, and we can enforce
>>>   standards of testing and code review on it.
>>
>> I agree with Jeff here.  You can still maintain this guarantee at the
>> build system level, and it cripples namespaces if I *cant* extend them in
>> ways that the original library author didn't want (for example, by
>> injecting a new module).  This is, after all, what Core does by shadowing
>> most of the Pervasives module.
>
> I wasn't meaning to make an argument against Leo's design here.  I
> just wanted to raise an issue about namespaces which other people may
> not have considered.  As long as the proposal allows us to from the
> build system enforce rules on what gets into a namespace, I'm happy.

One clarification on what you said earlier: I do think that this
feature is not strictly necessary to do what we did with Core vs the
OCaml stdlib.  We created a /new/ namespace that included things from
an existing namespace.  That's clearly necessary.  It's less obvious
to me that injecting things into a namespace that someone else created
is as important.

That said, I have no objections to the feature, as long as I can
prevent it from being used willy nilly within our own code.  (Thus, I
think I would object to source-level namespace declarations that the
build system had no say over.)


More information about the Platform mailing list