Phango - questions

Don Clugston dac at nospam.com.au
Mon Nov 26 02:21:39 PST 2007


Christopher Wright wrote:
> Don Clugston wrote:
>> Incidentally, one stylistic change between Phobos and Tango which 
>> hasn't been mentioned, is that Phobos uses a flat structure (except 
>> for a couple of things like std.c.windows.windows!). IMHO, the flat 
>> structure is decidedly inferior.
> 
> Why is that?
> 
> I work on a decently sized (40k lines) project in C#, and we're moving 
> from a deep hierarchy to a shallow one -- it's less typing, and we don't 
> see any advantages in the deeper structure.
> 
> If you point out a reasonable advantage, then I can probably work quicker.

Actually, I agree. I advocate shallow heirachies, not deep ones. But a 
completely flat heirarchy is not the same as a shallow one.

I think it's perfectly reasonable to have a fairly large number (say twenty, 
maybe many more) entries on each level.
That gives 20*20*20 = 8000 modules with just a three-level structure.
But 8000 modules in one directory would be insane. Pretty soon, all the good 
names are taken. For the more obscure things, you find yourself wanting to 
include the root name inside the module name. Two examples in Phobos are 
'socketstream' and 'metastrings'. As Phobos expands, it will get worse.

Personally, parts of Tango's structure are a bit too deep for my liking. (I 
don't think frequently used stuff should be more that a couple of levels deep;
I hope I never have to use tango.net.cluster.tina.util.model.IServer; I think 
tango.util.collection.HashMap is way too much to type for something so 
fundamental). But it has room to expand.




More information about the Digitalmars-d mailing list