Phango - questions

Christopher Wright dhasenan at gmail.com
Mon Nov 19 05:53:52 PST 2007


Don Clugston wrote:
> Kris wrote:
>> "Bill Baxter" <dnewsgroup at billbaxter.com>
>>> Yes, newcomers.  4 is less than 10.  That makes you newcomers 
>>> relative to phobos and the D style guide Walter has had posted up on 
>>> digitalmars.com that I presume is about as old as phobos.  That's all 
>>> I meant.
>>
>> Oh that's easy to answer: we understood those to be guidelines only, 
>> and felt that some minor details would need adjustment for our 
>> purposes. I recall there was some technical difficulty regarding 
>> module names at the time, but don't recall the specifics right now.
>>
>>
>>>> As for conventions, it is my opinion that Tango doesn't have to 
>>>> justify the choices made to anyone at this point. It's water under 
>>>> the bridge, just as the some minor stylistic choices in phobos or D 
>>>> are now just water under the bridge. As Walter already noted: Tango 
>>>> can use whatever style it wants.
>>> Yes, Tango can use whatever style it wants, but obviously some 
>>> choices are better than others.  Nobody here is arguing that RanDoM 
>>> CaSE for module names would be a good thing, for instance.
>>
>> Are you sure about that? :p
>>
>>
>>>> moving along, I believe Sean's two questions (posted much earlier, 
>>>> which I repeated on his behalf) were intended to elicit some 
>>>> positive feedback?
>>> Yes.  I do wish certain parties would stick to the issues here.
>>> Elsewhere in this thread some constructive points have been mentioned 
>>> pro and con lowercase module names.  I'll try to summarize without 
>>> injecting any biases:
>>
>> The effort is appreciated Bill, but realistically, Tango is not going 
>> to change in this manner. As has been noted several times prior, one 
>> persons stylistic meat is another's stylistic poison. There's no 
>> resolving that, and we have no wish to attempt to. It's a dilemma, and 
>> the kind of religious distinction that people would kill each other 
>> for in the past (and still do, actually).
>>
>> Certain individuals cannot see past that, and find bitter resentment 
>> in the use of the shift-key here and there. Yet, the same folks are 
>> staying quiet about toString() and so on. Let's face it, 
>> function/method names are used more often than import names for 
>> example. So, I feel (a) this issue is daft and/or myopic to begin with 
>> (b) there's nothing that could be done without upsetting the stylistic 
>> preferences of others (c) there's little value in paying heed to the 
>> opinion of those who "refuse" to use a library simply because it 
>> doesn't adhere to one tiny stylistic notion, which couldn't in 
>> practice be changed anyway. Better for us to listen to people who are 
>> willing to be a little flexible.
>>
>> Cheers;
> 
> Kris -
> I think there's a legitimate concern here which you've been ignoring. It 
> would be helpful to give some background as to why Tango uses the 
> conventions it does. And my guess is that the primary reason Tango uses 
> the conventions it does, is that you have a Java background!
> 
> Ultimately, I suspect that the underlying conflict arises because Tango 
> has heavy Java influence, whereas Phobos is mostly modelled on the C 
> standard library.
> 
> 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.

The documentation should be hierarchical or task-oriented, of course, so 
you can find what you're looking for easily. I'm not so certain that 
encountering three nested packages before a module is an advantage in 
itself, even if those packages are well organized (for instance, NOT 
lumping collections in with a whole bunch of random date/time and 
logging stuff -- I think Tango might benefit from dumping all the 
packages under util into the tango package).

You might be able to find the file you're working on more easily with 
deeper structure. It might be a frequent issue when you're working with 
a GUI that doesn't allow you to type a file name to select and open that 
file. That's the best argument I see at the moment.

You've more experience than I, I'm sure, so you probably have good 
arguments in favor of a deeper hierarchy for your code. I'd like to hear 
them. And please, if I go on to argue with you about it, point me to 
this paragraph saying that I'm only looking for information, not a flamewar.

> As Andrei said before, D can expect a flood of refugees from C++ over 
> the next couple of years. To be hospitable to them, we need to recognize 
> that they'll be suffering from culture shock. This doesn't necessarily 
> mean that Tango needs to change anything, but a more sympathetic 
> attitude is really important. The major stumbling blocks deserve a 
> little explanation.
> 
> -Don.



More information about the Digitalmars-d mailing list