On Tue, Dec 07, 2004 at 07:39:08PM -0500, Stas Bekman wrote:
Joe Orton wrote:
Well, since you really want feedback... ;) I often think this "naming correctness" stuff goes too far, it just makes the API too verbose and it can become unwieldy and ugly. Do you genuinely get confused by the existing names?
I do. But not confused. I find it hard to figure out what's a constant means when reading code. Adding a non-ambiguous prefix helps resolve that issue.
Short constants work great when they are used in enum, which is used in struct, so you always have a field name which is unambigous. When the constant is hanging in the air alone, it's not easy to get what does it do.
But that's rare, it's so much more likely that e.g. the APR_FOPEN_* constants sit inside or near an apr_file_open call, where they are pretty unambiguous. The only bad one is APR_READ vs APR_UREAD. I'm not trying to say it's black and white just that the trend worries me, if the consensus is that these are a good thing then go for it.
OK, I'll go with:
1) apr_file_permissions group:
APR_USETID => APR_FILEPROT_USETID APR_UREAD => APR_FILEPROT_UREAD etc.
rename, but leave out:
2) APR_FILEPATH_* => APR_FPATH_* to be consistent with FOPEN, FINFO, FCNTL, etc.
since (2) doesn't help to disambiguate things. In fact it should be preferrable on you, Joe, since it makes the constant shorter :) but whatever...
But that's not the point. I've posted the proposal back in May, it's been dragging since then with 2 +1s and zero feedback in-between. Since there is no general acceptance to this rename idea, I don't feel like it's the right thing to do. But on the other hand none said no. So I'm lost. Now I've committed one rename, and it's not clear if it's going to stay or not. So if the majority says no, I just back it out and move on. If yes, then I commit the other things and move on. But silence brings me nowhere.
I don't know, what's the consensus, who else cares about the naming? If I'm sat in my own little pedantic world on this then I don't want to get in your way :)
In any case thank you for the comments, Joe.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com