Le 16/08/2013 22:09, Matthew Brush a écrit :
[...]
Not meant as a rant against G*,
Sorry then, I read the final sentences as such, sorry.
when it was started (~1998 IIRC), there was a reason for wrapping all the (then) non-standard stuff for portability. But now, it just makes it harder for people to contribute code since many are used to using standard C (or more likely C++) and have to double check everything to make sure that nothing post 1989 was used unless it has a g in front of it.
You're dreaming, I 99.99999% sure *nobody* does it, and if we don't have to change much is only because there aren't much use of the things C99 adds. And at worse it's only adding "g_" in front, it doesn't really mangle the name.
P.S. Sorry for the bikeshed bait.
Yeah, and sorry to sound so annoying (especially in the other mail ;), but I really see this as "let's upgrade for the sake of upgrading", and I don't see the point. And this annoys me when you try to justify it by ranting against G* -- not that I care about the rant, but because it's a false justification.
Although I often do rant against G*, I didn't do that here at all, I don't think. My point is why does everyone (core devs and especially other drive-by contributors) have to use rules from before you were born (or so), just for the sake of you being able to stick -pedantic -std=c89 on your compiler command line? It seems so arbitrary.
A: Why not? Or, so we don't get mixed declaration and code, it just doesn't build with -std=c89 :)
Although I'm not fan of the idea, I wouldn't bikeshed against it if there was a reason *to* do so. The only one I see in your mail is "Allowed to declare loop counter-style variable inside the for loop", and I don't find it worth even updating HACKING.
Even if it was only for // comments, what's the argument for *NOT* starting to use a well-established ISO standard that's already one full iteration behind the current standard? Sure we might only use 4 or 5 "new" language features in practice as opposed to the full list I pasted, but so what? Why not? What do we lose by doing this?
What do we get?
BTW, what originally inspired me to send this message was that many many PRs have this comment attached to them: "no //-style comment, we use C89" (paraphrasing). IMO that's a crap reason for blocking a contribution or making someone (who used a perfectly standard C feature) add another commit, squash it into the previous ones and open a new pull request (or however it gets dealt with).
We cant change them ourselves, indeed. But even if we started to use C99 (why?), I'd still would like to keep our style -- which does include "no C++-style comments" :) Why? Because I like it, because it'd be consistent with the rest of the sources, and because it doesn't hurt. Yesterday I said "no blank line at start of block": this has nothing to do with the language, it's just useless and ugly.
{ .Cheers = "Matthew Brush" };
return "Cheers";