Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > IDEA: Nested Packages in Java

Reply
Thread Tools

IDEA: Nested Packages in Java

 
 
Davin Pearson
Guest
Posts: n/a
 
      10-08-2005
I have written an article explaining a
flaw in the design of Java packages
and a design pattern that gets
around this limitation...

Click on the following link to read my article:

http://www.geocities.com/davinpearso...2005/npij.html

So what do all the Java programmers out there
think of my proposal...

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-08-2005
On 7 Oct 2005 23:32:50 -0700, "Davin Pearson"
<(E-Mail Removed)> wrote or quoted :

>http://www.geocities.com/davinpearso...2005/npij.html


I think all you are saying is that you want to treat hierarchical
package names as being related by the hierarchical structure rather
than treated as totally independent as now.

You could do it so that leaves can see branches. I don't think you
should allow branches to see leaves. So basically you are relaxing
the package scope to allow subpackages to view their mother packages
as if they were directly part of them.

..

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
 
Tim Tyler
Guest
Posts: n/a
 
      10-09-2005
Davin Pearson <(E-Mail Removed)> wrote or quoted:

> I have written an article explaining a
> flaw in the design of Java packages
> and a design pattern that gets
> around this limitation...
>
> Click on the following link to read my article:
>
> http://www.geocities.com/davinpearso...2005/npij.html
>
> So what do all the Java programmers out there
> think of my proposal...


One of the last times we discussed Java's fake package heirarchy,
(on the "more granularity in class scoping" thread here back in 2003)
I doubted whether it would ever happen for Java.

That was a while ago now - and usually change gets more difficult
as you age.

The whole idea of packages and classes being different seems tied
in with Java's convention of mapping classes to files and packages
to directories.

However, it's a bit of a silly distinction from just about any other
perspective.

The result is two ways of making objects nest within each other -
when all that is really needed is one way.

IMO, future languages should not inherit Java's package/class split.

Instead they should only have objects - and they should have
much more flexible permission modifiers, to allow or restrict access
to ancestors, offspring, siblings and perhaps other kin and named
friends.
--
__________
|im |yler http://timtyler.org/ http://www.velocityreviews.com/forums/(E-Mail Removed) Remove lock to reply.
 
Reply With Quote
 
iamfractal@hotmail.com
Guest
Posts: n/a
 
      10-10-2005

Davin Pearson skrev:

> I have written an article explaining a
> flaw in the design of Java packages
> and a design pattern that gets
> around this limitation...
>
> Click on the following link to read my article:
>
> http://www.geocities.com/davinpearso...2005/npij.html
>
> So what do all the Java programmers out there
> think of my proposal...


Hi,

I'm still working through the code example, but on first reading, I
can't help but notice the quote: "Importantly, we are looking at
package visibility applied to fields (methods and properties) but not
to classes."

Why not examine class visibility similarly? Then Java could be, " ...
re-engineered so that it no longer has this limitation," on
class-level, either.

For what it's worth, and precisely because of the containment
hierarchy, I think alpha.beta classes should be able to see alpha
classes, but not the other way round.

See: http://www.EdmundKirwan.com/servlet/...ac-page50.html

..ed

--
www.EdmundKirwan.com - Home of The Fractal Class Composition.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Packages : A loomingproblem? packages might no longer work? (well not on your platform or python version anyway) David Lyon Python 19 04-23-2009 11:10 PM
Advice on converting hashed packages to pseudo-hashed packages Ian Perl Misc 3 02-12-2005 12:17 AM
Do the javax.imageio packages replace packages in com.sun.image? Paul Smith Java 0 11-18-2003 02:58 PM
Re: Eclipse using nested packages Andrew Thompson Java 0 08-08-2003 07:07 AM



Advertisments