appeal again: discard the syntax of private:, public: static:private{}, public{}, static{}.
Regan Heath
regan at netwin.co.nz
Sat Jun 24 18:09:55 PDT 2006
On Sat, 24 Jun 2006 18:52:08 +0800, Boris Wang <nano.kago at hotmail.com>
wrote:
> And this is what ?
In Dereks example the protection attribute applied to all 6 pages is the
one written above them, that attribute is simple to find, and simple to
remember while reading the latter 6 pages. I find it far easier to read
than:
private a_type var1;
public static a_type var2;
public static int func1(...)
{
}
private a_type var3;
public int func2(...)
{
}
private static int func3(...)
{
}
public a_type var4;
private a_type var5;
public static int func4(...)
{
}
private static a_type var6;
private a_type var7;
public int func5(...)
{
}
private a_type var8;
private int func6(...)
{
}
where I have to filter out all the redundant 'private' etc text in order
to see the _actual_ code, the code which actually does something.
> If you can make a good enough solution for this problem, i'll give up.
Dereks example is how _I_ (and Derek perhaps) would write it, the code
above is how _you_ would write it. Neither form is _incorrect_ it's simply
a matter of personal preference.
>> private int var;
>>
>> public int func( .. )
>> {
>> }
>
> this syntax has no other problem, except that some people don't like it.
This syntax forces the use of redundant 'public' etc text, which _I_ find
clutters the view and obscures and obfuscates the important parts of the
code.
> The codes of mango project is more beatiful than the others i readed.
Each to their own (which is the point I am trying to make).
Regan
More information about the Digitalmars-d
mailing list