Re: Re: ctype function (re?)naming

From: Date: Wed, 07 Mar 2001 17:20:27 +0000
Subject: Re: Re: ctype function (re?)naming
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-48181@lists.php.net to get a copy of this message
Andi wrote: > At 04:34 PM 3/7/2001 +0100, Hellekin O. Wolf wrote: > >At 17:22 07/03/2001 +0200, Andi Gutmans wrote: > > > >>>*** What is the difference between error ad errstr ? bzerror returns an array containing the error string and error number. > >>>Maybe errstr should be changed to errmsg ? (Did I say that elsewhere ? ;-) > >>>As the file extension is .bz2, maybe the prefix should be bz2_ as well > >>>(it's an algorithm, not a version right ?) bz2_ vs. bz_ ... this is a coin-toss decision. We might run into an extension in the future where bz is a good choice for the name, thought I feel it is unlikely. Personally, I don't *really* care - if it came to a heated discussion and a vote, I would go for bz2_... - just so that the no one could tell us "I told you so..." in the future. ;) > >>How about error_message or error_string? > > > >*** Well, errmsg/errstr are everywhere else, be it in PHP or C. > >errno would take the lifting also... We would end with function names like : > > > > mysql_error_number() > > mysql_error_string() > > > >Looks great regarding paragraph formatting but wastes lots of keystrokes ;-) > > It's always better to write a few extra characters if it makes your code > much more readable. Agreed. We could try to save a bit of space doing /error/err/ or /string/str/ or /number/num/. Where do we draw the line on length/convenience vs. readability? --zak

« previous php.dev (#48181) next »