Phango - questions

David Wilson dw at botanicus.net
Mon Nov 26 08:52:42 PST 2007


On 11/26/07, darrylb <noemail at example.com> wrote:

> > Actually, I agree. I advocate shallow heirachies, not deep ones. But a
> > completely flat heirarchy is not the same as a shallow one.
> >
> > 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;

> Are you serious? You're worried about typing out a few extra characters in your import? Seriously, how much extra time is typing out maybe 10-20 characters going to cost you, as compared to say, writing the actual code for the module?

> I'm not meaning to pick here but.. this just seems so inconsequential as to not even be worthy of mentioning.


I doubt this has anything to do with number of characters typed, at
least not in my case. My problem with deep nestings is that I simply
do not remember them. When you have on average a single word per
module ala. Python or Phobos, remembering where a class lives involves
recalling a single english-sounding word, which my brain is
excellently geared for.

There are variations of this theme, but that is basically it. I know
that any filesystem functions in Phobos lives in std.path, std.file,
std.stream, std.stdio. If I had to guess the same about Tango, I might
go searching the docs for words like "conduit" which bare no
resemblance to what I'm actually trying to achieve.

Just suggesting that for some people, this issue has more substance to
it than merely a matter of style.


David.

>
> If a slightly deeper structure leads to all sorts of benefits (logical separation, better segmentation of generated documentation, future-proofing expansion, etc) I really don't mind the extra 5 seconds to type out a bit more at the top of a module that I'll probably be working on for _much_ longer. Less typing? Sure, but the act of physically pressing keys and getting characters on the screen is _not_ the 'work' of the programmer... and 'tango.HashMap' versus 'tango.util.stuff.otherthings.collections.HashMap' .. who cares, as long as it works. After you're finished the 'pain' of typing that out once, you can always cut & paste it into other modules if it's that big of a deal :P
>



More information about the Digitalmars-d mailing list