what's so difficult about namespace?

W

Wojtek

Roedy Green wrote :
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.
 
B

Barry Margolin

[QUOTE="Wojtek said:
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.[/QUOTE]

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.
 
T

Tim Roberts

Lew said:
It's mostly a problem of culture.

If you look, for example, at chinese [sic] names, the name space is not that
much important:
"Xee Laa" only takes this space:
" "
^^^^^^^

Chinese names are presumably not spelled with Roman letters in Chinese, so
this really says nothing about how Chinese "wastes" space.
Instead, if you take a typical english [sic] name, say, "Abraham Lincoln",
you instantly recognize the waste of space used by this name:
" "
^^^^^^^^^^^^^^

How is that wasted? "Abraham Lincoln" is a longer name. Only one character
is silent. In the transliteration you show for a Chinese name, two characters
are wasted.

Caution: humor impairment detected. That's what Jon gets for not using
<parody> tags around his posting.
 
L

Lew

Tim said:
Lew said:
It's mostly a problem of culture.

If you look, for example, at chinese [sic] names, the name space is not that
much important:
"Xee Laa" only takes this space:
" "
^^^^^^^
Chinese names are presumably not spelled with Roman letters in Chinese, so
this really says nothing about how Chinese "wastes" space.
Instead, if you take a typical english [sic] name, say, "Abraham Lincoln",
you instantly recognize the waste of space used by this name:
" "
^^^^^^^^^^^^^^
How is that wasted? "Abraham Lincoln" is a longer name. Only one character
is silent. In the transliteration you show for a Chinese name, two characters
are wasted.

Caution: humor impairment detected. That's what Jon gets for not using
<parody> tags around his posting.

Caution: humor impairment detected. It wasn't funny.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top