Re: some comments about our C++ code...


Subject: Re: some comments about our C++ code...
From: Joaquin Cuenca Abela (cuenca@celium.net)
Date: Wed Apr 18 2001 - 09:01:50 CDT


On 17 Apr 2001 12:18:54 -0700, Paul Rohr wrote:
> At 10:17 AM 4/16/01 +0200, jskov@zoftcorp.adsl.dk wrote:
> >>>>>> "Dom" == Dom Lachowicz <cinamod@hotmail.com> writes:
> >Dom> foo_type getFoo(void) const; void setFoo(foo_type);
> >
> >Dom> That's all I have to say. Using protected for anything other than
> >Dom> methods is horrible and should be considered wrong/bad code.
> >
> >Worth adding as a coding standard element, maybe?
>
> Like Martin, I'm one of the long-time practitioners of the existing
> "horrible" coding style, so it's obviously never bothered me personally. I
> certainly have no objections to anyone who wants to do the extra upfront
> work to implement "better" get/set interfaces. Currently some people do, in
> fact.
>
> To be clear. I'd be willing to live with the proposed change to the coding
> standards, with the following proviso:
>
> Fix the existing code to match the standard *first*.

I don't think that it should be a must to fix "the standard".
If all we agree (and it seems that we agree) that having
public/protected variables or public virtual methods is bad, I think
that we should reflect it in the standard, and ask to everybody to not
commit code that not fit in the standard.

And try to fix existing code, of course, but in the same sense that I
find useful to have a standard that says how we should indent, name the
variables, etc. *even* if we have large chunks of code that don't follow
current standard (it's only me, or everybody is finding/fixing bad
indentation? And, yes, my editor is correctly configured :-)

To delay the integration in the standard of these rules only helps to
get more code to be fixed in the future (and unlike the indentation, the
not public/protected stuff is *NOT* stylistic stuff)

Cheers,

-- 
Joaquín Cuenca Abela
cuenca@celium.net



This archive was generated by hypermail 2b25 : Wed Apr 18 2001 - 09:03:24 CDT