[ocaml-platform] on the need and design of OCaml namespaces
Yaron Minsky
yminsky at janestreet.com
Tue Feb 26 19:48:03 GMT 2013
On Tue, Feb 26, 2013 at 1:14 PM, Alain Frisch <alain.frisch at lexifi.com> wrote:
>
> Do you agree that the information about which libraries are used by a
> specific part of the code base will be part of the build system anyway?
>
> Now we could discuss putting library-related information in the client code
> itself (this is a common request for "syntax extensions", but I don't see
> why this is specific to them), e.g. in the form of special
> comments/attributes understood by ocamlfind, but this seems a different
> topic to me.
Your point is fair. I guess what I'm saying specifically is that
namespace manipulation belongs in the source. Right now, if the build
system, it might cause my build to fail, or too much to be linked in,
but it won't change the meaning of my program in a material way.
In short, I'd like to keep the things that affect the meaning of my
program largely in the source. I agree that for very pervasive
things, like Core.Std or sexplib within Jane Street, you may want to
make this silently present at the build-system level. But most of the
time, you want to be explicit about this kind of change to the
semantics of your program.
Maybe the main difference between us is this: I want to use namespaces
for multiple libraries, not just highly pervasive ones like Core. You
think of namespaces as a thing to solve the fairly narrow problem of
Core. If I thought you were right about this, I would agree with the
rest.
More information about the Platform
mailing list