appeal again: discard the syntax of private:, public: static:private{}, public{}, static{}.
Boris Wang
nano.kago at hotmail.com
Sat Jun 24 19:28:40 PDT 2006
"Derek Parnell" <derek at psych.ward> дÈëÏûÏ¢ÐÂÎÅ:op.tbndxng06b8z09 at ginger.vic.bigpond.net.au...
> On Sat, 24 Jun 2006 20:52:08 +1000, Boris Wang <nano.kago at hotmail.com>
> wrote:
>
>> And this is what ?
>>
>>>
>>> // six pages
>>> ...
>>>
>>> int func3(...)
>>> {
>>> }
>>> int func4(...)
>>> {
>>> }
>>> int func5(...)
>>> {
>>> }
>>> int func6(...)
>>> {
>>> }
>>> int func7(...)
>>> {
>>> }
>>> a_type var2;
>>> }
>>> int func2(...)
>>> {
>>> }
>>> a_type var4;
>>> int func5(...)
>>> {
>>> }
>>> }
>>
>> If you can make a good enough solution for this problem, i'll give up.
>
> The problem you highlight with this example does not go away with either
> style of coding, because without seeing the code at the matching open
> brace, you can't tell what the scope of the contents is. For example, your
> example could begin with ...
>
> private void xfunc() {
>
> making all the functions nested and thus sort of private. Without actually
> looking, you can't tell from just seeing the end of a braced code snippet.
>
>>> private int var;
>>>
>>> public int func( .. )
>>> {
>>> }
>>
>> this syntax has no other problem, except that some people don't like it.
>
> Oh well! Get used to the idea of free choice. Coders have been given the
> opportunity to code using the style that find helpful or best expresses
> their frame of mind. And that is not intrinsically a bad thing. I won't
> force my style on you and I expect that you won't force your style on me,
> okay?
>
I don't dislike each style syntax, except the problem i talk about.
What we discussed here, is not what you like or i like, if you really love
D.
>> The codes of mango project is more beatiful than the others i readed.
>
> Yes, it is lovely code and easy to read. Well done Mango team. A lot of
> that has got to do with adhering to coding standards regardless of what
> those standards are.
>
Hmm, you have admit that the syntax without colon and curly braces can
produce readable and maintainable codes.
But, the syntax with colon or curly braces, has the problem of
expansibility.
> --
> Derek Parnell
> Melbourne, Australia
More information about the Digitalmars-d
mailing list