Omitting GLOBAL when empty

3 views
Skip to first unread message

Patrick Mezard

unread,
Dec 11, 2007, 8:15:09 AM12/11/07
to jgrousedoc
Hello,
Could the GLOBAL namespace be omitted when empty ?
Maybe this behaviour could be generalized to all namespaces ?

Broofa

unread,
Dec 11, 2007, 8:39:08 AM12/11/07
to jgrousedoc
Hmm... good question. If global only contains namespaces (i.e. no
vars/functions), then I think this might make sense. But if there are
global functions or variables, I think you pretty much have to have
GLOBAL as a way of indicating those exist - they kind of have to
belong to a namespace of some sort and this was the best we could come
up with when we talked about this issue a month or two ago.

Patrick Mezard

unread,
Dec 11, 2007, 9:49:12 AM12/11/07
to jgrousedoc
Broofa a écrit :
> Hmm... good question. If global only contains namespaces (i.e. no
> vars/functions), then I think this might make sense. But if there are
> global functions or variables, I think you pretty much have to have
> GLOBAL as a way of indicating those exist - they kind of have to
> belong to a namespace of some sort and this was the best we could come
> up with when we talked about this issue a month or two ago.

I agree with that.

denis.r...@gmail.com

unread,
Dec 11, 2007, 7:03:02 PM12/11/07
to jgrousedoc
I don't think that it would be practical to drop GLOBAL - you need
certain root anyway - but I was thinking about collapsing namespaces
that contain only other namespaces, pretty much like Eclipse does in
Package Explorer when you select "hide empty packages". Of course,
that should be optional behavior.
How's that?

Denis

Broofa

unread,
Dec 11, 2007, 9:16:43 PM12/11/07
to jgrousedoc
That was my reaction at first. "Of course you always have something
in the global space, right?". But then it occurred to me that you
might only be documenting a certain path w/in the global namespace, in
which case GLOBAL would kind of get in the way.

For example, let's say we have the "zenbe" object at the top level,
but we (Zenbe, Inc.) don't want to publish our entire api. Instead,
we just want to publish some subset of that... "zenbe.widgets" or
something like that. Yeah, technically the path to that is
GLOBAL.zenbe.widgets, but I wouldn't really want that GLOBAL sitting
at the top all the time. It's not really important or relevant to the
APIs I'm trying to document.

I guess my point is I can see why it'd be nice to not have GLOBAL
documented in some cases. But it's not something I have a great need
for either.
Reply all
Reply to author
Forward
0 new messages