On 10/25/2012 04:54 AM, Kris Craig wrote:
So you propose to implement strict type checking of parameters because a
few bozos don't read the documentation? That doesn't make much sense to me.
What makes more sense is that the extension perform its own type checking
where that is appropriate. I have plenty of subroutine code that checks
what it was passed, it isn't difficult to do the job right instead of
twiddling the language every time somebody complains.
And by the way, is there any effort in-progress to make the basic
subroutine calls more uniform, or are is_array() and isset() and friends
going to forever remain underscore versus non-underscore?
Perhaps I have no clue, but it sounded as though the language was to be
changed to "fix" an error in an extension, 'scuse me if I'm talking out of
my nether orifice.
Well, at least you're living up to your username, crankypuss.
Apparently I need to look into gmane settings in order to avoid
receiving direct email replies in addition to seeing replies on the list.
Still,
though, if your goal is to persuade as opposed to simply trolling, you're
probably not going to be very successful by engaging in name-calling
What name-calling? People who pass the wrong data to subroutines are
bozos, plain and simple, by definition; if they actually test their
code, they'll figure out what they've done wrong, thus showing that they
aren't bozos after all. That applies to anybody, me included: if you
write bad code you are a bozo, end of story. It's neither incurable nor
fatal but being nice to bozos for the sake of political correctness is
just silly.
and
going on a tangent about the consistency of function names. If you'd like
to ask about function names, please start a separate thread for that.
Attempting to hijack this thread to discuss your unrelated grievance won't
get you very far.
Let's stick to the issues: don't change the language to make up for a
poorly written extension used by people who don't read the doc and test
their code, is that difficult to grasp?
Also, I've seen this error quite a few times. It's not just "a few bozos,"
as you put it. It's an easy error to make even if you're knowledgeable. I
agree that any behavioral changes should happen in libcurl and not PHP,
Then we agree, what's the reason for your rant?
but
that doesn't mean this isn't a problem or that we should just belittle
those who have encountered it and ignore it. Updating the documentation to
address this specific mistake might help reduce its frequency somewhat.
Throwing a warning or notice if a bool is passed would also be helpful in
my opinion.
If you limit it to the offending extension, file; if you want to throw a
warning every time a boolean is passed to a subroutine, I'll be very
disappointed in the PHP development community.
Let's not troll the OP for suggesting a solution to this issue just because
we don't agree with it. It's just a matter of mutual respect. This isn't
4chan or YouTube, after all. ;)
Get over that stuff please, it's a simple matter, one does not modify a
language to pamper poorly written extensions unless he wants the
language to rapidly become a kludge.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php