From: Roedy Green
Subject: Re: what's so difficult about namespace?
Date: 
Message-ID: <mrtti4dp2d0u3ikqtn33e7mvt13icur9va@4ax.com>
On Tue, 25 Nov 2008 22:29:43 -0800 (PST), Xah Lee <······@gmail.com>
wrote, quoted or indirectly quoted someone who said :

> If it is a social problem, i don't imagine they
>would last so long. It must be some technical issue?

The problem with namespaces is they resolve the ambiguity for
computers, but not for humans.

Humans are often confused if you mean java.util.List or java.awt.List.
It is best to avoid reusing names because of the way the human brain
works.

Namespaces are a safety feature.  You should try to avoid reusing the
same name in different contexts, with a number of exceptions for some
common "local" names.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
 whose ultimate consequences could be second only to global nuclear war." 
~ Environment Canada (The Canadian equivalent of the EPA on global warming)

From: Wojtek
Subject: Re: what's so difficult about namespace?
Date: 
Message-ID: <mn.daf17d8b18f2e79f.70216@a.com>
Roedy Green wrote :
> On Tue, 25 Nov 2008 22:29:43 -0800 (PST), Xah Lee <······@gmail.com>
> wrote, quoted or indirectly quoted someone who said :
>
>> If it is a social problem, i don't imagine they
>> would last so long. It must be some technical issue?
>
> The problem with namespaces is they resolve the ambiguity for
> computers, but not for humans.

The good thing abbout namespaces is that they allow for better 
organization of application function. And (in Java) they also allow for 
information hiding via the default modifier.

> Humans are often confused if you mean java.util.List or java.awt.List.
> It is best to avoid reusing names because of the way the human brain
> works.

Ah but the human does know the context. Am I showing stuff on the 
screen, or am I storing information. Different operations.

> Namespaces are a safety feature.  You should try to avoid reusing the
> same name in different contexts, with a number of exceptions for some
> common "local" names.

Don't know what you mean by "local". I have many tens of packages (um, 
namespaces). Each has a Data class which is passed around by other 
classes in the same package (Command, SQL, Validator, the servlet). Is 
the Data class "local"? Yet it is marked as public because the JSP 
needs to use it.

-- 
Wojtek :-)
From: Barry Margolin
Subject: Re: what's so difficult about namespace?
Date: 
Message-ID: <barmar-CBB0DC.15405127112008@mara100-84.onlink.net>
In article <·························@a.com>, Wojtek <·······@a.com> 
wrote:

> Roedy Green wrote :
> > Namespaces are a safety feature.  You should try to avoid reusing the
> > same name in different contexts, with a number of exceptions for some
> > common "local" names.
> 
> Don't know what you mean by "local". I have many tens of packages (um, 
> namespaces). Each has a Data class which is passed around by other 
> classes in the same package (Command, SQL, Validator, the servlet). Is 
> the Data class "local"? Yet it is marked as public because the JSP 
> needs to use it.

I think he means variables that are just used in local contexts, e.g.

(dotimes (i ...) ...)

You shouldn't need to worry about the namespace of I.

-- 
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***