appeal again: discard the syntax of private:, public: static: private{}, public{}, static{}.
Derek Parnell
derek at psych.ward
Fri Jun 23 16:45:35 PDT 2006
On Fri, 23 Jun 2006 21:21:35 +1000, Boris Wang <nano.kago at hotmail.com>
wrote:
>
> "xs0" <xs0 at xs0.com> ??????:e7gddu$26gk$1 at digitaldaemon.com...
>> Regan Heath wrote:
>>> On Fri, 23 Jun 2006 17:05:15 +0800, Boris Wang <nano.kago at hotmail.com>
>>> wrote:
>>>> the harm of these is more than the benefit.
>>>>
>>>> all these syntax produce non-readable, non-maintainable codes, and
>>>> even
>>>> more in large project with many developers.
>>>
>>> My vote is against removing these. I use them and prefer the : syntax
>>> for
>>> private etc within class/struct declarations.
>>
>> My vote is against having either public: or public {} :)
>>
>> With both you can't see what applies to a declaration from the
>> declaration
>> alone, but have to scan backwards for an arbitrary amount of lines..
>>
>
> Just because these reason.
>
> private a_type var;
>
> public static int func(...)
> {
> }
>
> this syntax is simple, clean and enough.
>
And this is what ...?
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(...)
{
}
Compared to ...
private {
static {
int func3(...)
{
}
a_type var6;
}
a_type var1;
a_type var3;
a_type var5;
a_type var7;
a_type var8;
int func6(...)
{
}
}
public {
static {
int func1(...)
{
}
int func4(...)
{
}
a_type var2;
}
int func2(...)
{
}
a_type var4;
int func5(...)
{
}
}
--
Derek Parnell
Melbourne, Australia
More information about the Digitalmars-d
mailing list