Guilhem Bichot skrev 2010-09-27 09.33:
> Hello Davi,
> Davi Arnaut a écrit, Le 25.09.2010 03:31:
>> On 9/24/10 12:22 PM, Mats Kindahl wrote:
>>> In this particular case, we would probably be better off if we could
>>> turn on -std=c89, which disallows C++ comments in C code.
>>> The downside is that it would of course mean that we have to start
>>> writing standards-compliant C code (oh horrors!). :)
>> I wish that overtime we could focus more on styles and actions, such
>> as this, that have more practical consequences. Over time,
>> discussions about the cosmetic aspects of coding style tend to get
>> very silly.
> Since I'm the one who sent the original proposal, I feel a bit
> targetted by the suggestion, so please let me explain.
> I have worked in MySQL dev for soon 8 years and have respected the
> coding style as requested. But, maybe it's the effect of those 8
> years, I end up tired of some rules, finding them plain unneeded.
> Why can I write
> int x; // this is an end-of-line comment
> but not
> // this is a comment alone on its line
> why does it have to be
> /* this is a comment alone on its line */
> I don't know. I pointed out the small problems which it causes. And I
> find that learning and keeping this rule in mind is an unneeded burden
> put on newly hired developers.
> That we should get rid of it in order to simplify our coding style and
> free the brain for something else.
> When I made my proposal, I expected to receive only "yes of course"
> feedback without any opposition, and later have this straightforwardly
> approved by the committee and be done with it.
> I didn't expect it to launch a discussion. Conclusion: "you never
I agree with you and I fully support your quest so far. I think the
problem is that your audience assumes that you would go even further and
do some task which they *may* oppose, or they consider the 'yes' answer
so obvious that they move on to discuss other things in you thread. Then
the discussion totally veers off and nobody knows who opposed what. :-)
In this case I see no protests against your proposal. People have
different preferences for their commenting style, this is
understandable. But there is no support for keeping the rule you speak of.
> Same for my "true/false instead of TRUE/FALSE" proposal. I am asking
> that we just accept what the C++ standard defines. I think that new
> devs would be better off if they didn't have to learn and remember
> that they must use TRUE/FALSE. That reviewers would be better off if
> they didn't have to watch for use of true/false and reject it.
> Again I thought it would get "yes of course" feedback.
Iirc you did get positive feedback. But the discussion quickly went
towards how to treat boolean values in C. In my mind you got one
supporter and no opposition. Get on with it; make a patch and have
someone review it!
> I will probably continue making proposals of this kind in the future.
That's the spirit! Don't give up and don't be afraid to moderate the
discussion threads when they drift off topic.
Just my few cents,