RE: [PHP-QA] Resurrecting the Function Renaming Thread
| From: | Cynic | Date: | Wed, 07 Feb 2001 16:56:58 +0000 |
| Subject: | RE: [PHP-QA] Resurrecting the Function Renaming Thread | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2289@lists.php.net to get a copy of this message | ||
At 17:41 7.2. 2001, James Moore wrote the following:
--------------------------------------------------------------
>> >DONT SCREW UP WHAT WORKS
>>
>> Actually, from my POV a language that has bin2hex, dechex and
>> strtolower has been screwed up somewhat already. Whether this
>> is one to one to C or not is not an issue for me, and for quite
>> an amount of people who _don't_ have the C background. Lots of
>> win32 PHP people have VBS background, not C, which is more
>> common among the Unix nation.
>
>Well this is inconsistant naming and that is part of the cause yes but I
>dont to type bin_to_hex when bin2hex is just a clear, dechex should really
>be dec2hex and I agree that should be changed. What you are missing is
>people already know PHP and it would be a very bad thing for people to have
>to relearn it. when you begin to get
Well, I'd prefer binhex or bintohex. :) That's why we're talking
about it: we're just humans, and tend to think that our opinion is
the right one (of course :), and that everybody else (except for the
few difficult morons :) thinks the same. But it could be that either
of us is wrong, and 70% PHP users would prefer the way we dislike.
"It has been so for years" is _very_ strong argument, but in face of
a general preference, it fades. I don't say I'm right or that more
people would agree with me than with you. I just want to find out.
><?php
>
>....
>$var = mysql_fetch_array($res);
>$new_var = math_binary_to_hexidecimal($var);
>output_print_formatted_string("The Hexidecimal Value of $var is
>%d",$new_var);
>
>?>
Yes, this is very ugly. But is math_binhex impossible? (Nothing about
my preference.)
>OK thats taking it to an extreme but its ugly code keep it neat tidy and
>short and dont touch functions people already know well. Yes rename
>xsl_processfile to xsl_process_file (totally non existant function) but keep
>PHP neat.
Again, I'm glad there's someone with a different opinion. Because
I can now ask: what is a "function people already know well"? It
covers pack() for someone, while for someone else pack() might be
totally alien. If you were the jury, would you allow aliasing OCI*
functions?
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz