caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: james woodyatt <jhw@wetware.com>
To: Jeffrey Palmer <jeffrey.palmer@acm.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Namespace proposal: XML variant
Date: Fri, 30 Aug 2002 15:39:31 -0700	[thread overview]
Message-ID: <59900BFE-BC69-11D6-A71C-000502DB38F5@wetware.com> (raw)
In-Reply-To: <200208301525.07033.jeffrey.palmer@acm.org>

On Friday, Aug 30, 2002, at 13:25 US/Pacific, Jeffrey Palmer wrote:
> On Friday 30 August 2002 01:02 pm, Alessandro Baretta wrote:
>>
>> I propose to add an optional namespace construct to
>> explicitly associate namespace URIs with namespace names.
>
> Please, let's not entertain any of the rampant stupidity that the W3C 
> seems so
> mired in. I've always thought that the concept of using URIs for 
> namespaces,
> parameter settings, etc., was the most ridiculous thing I've ever 
> seen. [...]

A more constructive way to say this might be to observe that any syntax 
for a global namespace of Objective Caml types and values could be 
transformed into a URN by simply publishing an Internet RFC that 
defined the syntax for the namespace specific string, according to the 
requirements of RFC 2141.

It would seem desirable to choose a namespace syntax that lends itself 
easily to encoding in a URN.

Here's another strawman for discussion.

-----

The obvious choice for a namespace identifier is "ocaml" and this would 
produce URN's of the following form:

	<urn:ocaml:some:hierarchy:YourModuleHere.your_type_or_value>

I chose a ':' character to separate levels in the namespace hierarchy 
arbitrarily.  Other characters like '/' or '.' could easily be 
considered as well.

In this example, you could imagine that the compiler could be invoked 
with a namespace flag, like so:

	ocamlc -N :some:hierarchy -c yourModuleHere.ml -o yourModuleHere.cmo

You could then define a language construct that looks kinda like the 
following:

	namespace N = :some:hierarchy
	module M = N:YourModuleHere

The 'namespace' keyword would define an alias for a prefix to the 
modules in some part of the global namespace, and it would be used in a 
straightforward way as shown above to construct the names of externally 
defined module types.

The namespace would be encoded in the .cmi and .cmo files, and the tool 
chain would need to respect them as it searched for signatures and 
modules to reference.


-- 
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-08-30 22:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-15 16:21 [Caml-list] Namespace proposal Gurr, David (MED, self)
2002-08-15 17:00 ` Vitaly Lugovsky
2002-08-15 21:08   ` [Caml-list] " Michaël Grünewald
2002-08-18 17:05 ` [Caml-list] " John Max Skaller
2002-08-30 18:02   ` [Caml-list] Namespace proposal: XML variant Alessandro Baretta
2002-08-30 20:25     ` Jeffrey Palmer
2002-08-30 22:39       ` james woodyatt [this message]
2002-08-30 22:51       ` Blair Zajac

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=59900BFE-BC69-11D6-A71C-000502DB38F5@wetware.com \
    --to=jhw@wetware.com \
    --cc=caml-list@inria.fr \
    --cc=jeffrey.palmer@acm.org \
    /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).