Phango - questions

Tom S h3r3tic at remove.mat.uni.torun.pl
Sun Nov 18 17:00:14 PST 2007


Janice Caron wrote:
> (...) the /decision/ to ignore the
> style guide was petty. Note that the criticism was of the decision,
> not the people making it. And actually, I do that to deliberately go
> against the style guide was somewhat petty. (...)

And you realize that by stating that the decision was amateurish, you 
put yourself above the ones who made it? Thus, being a newbie, accused 
the Tango team of being amateurish.

Tango is seen by most of its users as a replacement for Phobos, so it 
doesn't have to be compatible with it, or use its naming conventions. 
What Walter states in the 'official style guide' has to be taken with a 
grain of salt. With all due respect, Walter is a single programmer as 
well, not an oracle or a religious guru whose words have to be followed 
exactly. Someone creates another lib for D - they may use whatever they 
like. I recommend a shock therapy - looking at this code: 
http://dsource.org/projects/scrapple/browser/trunk/tools/tools ;)

Anyway, as far as I remember, there was a deeper reason for having 
distinct casing conventions for module and package names. /* This might 
have been even before Tango (possibly in Mango) */ If lowercase was used 
for both module and package names, you could not have a module with the 
same (logical) name as a package.
About two or three years ago, I still used alllowercase for modules and 
packages and ran into this problem a few times. I took the idea of using 
MixedCase for module names from Kris. And it works very well. For 
instance, I have a module 'OpenGL' in my code and a package 'opengl', 
which exist in the same directory. opengl/*.d are implementations of 
specific components of the OpenGL module. Had I used lowercase for 
everything, both would be just 'opengl' and 'opengl.foo' would be a 
conflict between a module in the 'opengl' package and a symbol in the 
'opengl' module. See? A practical reason. Not to mention that 
MixedCaseNames are easier to read than mixedcasenames.

On the other hand, there is no practical reason not to use MixedCase, 
except the dubious case sensitivity issue of certain file systems ( I 
use Windows and Linux / Solaris with D interchangeably and don't 
experience said problems with MixedCase ).

If all it boils down to is personal preference and this is the main 
reason of this flamewar... Excuse me, but nothing is more amateurish or 
petty than that.

But since we're all enjoying the party of expressing our preferences... 
I think that Tango's style is much better than the official guide, plus 
I consider the guide flawed for ever suggesting UPPER_CASE_NAMES for 
consts and enum values.

I also know for a fact, that many Tango users simply agree with its 
design conventions, but find this entire discussion too silly and 
irrelevant to participate in.


-- 
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode



More information about the Digitalmars-d mailing list