Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23141 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13059 invoked by uid 1010); 4 May 2006 01:15:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13044 invoked from network); 4 May 2006 01:15:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2006 01:15:02 -0000 X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:53692] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DB/2E-63443-59559544 for ; Wed, 03 May 2006 21:15:01 -0400 Received: from [192.168.200.106] (c-24-6-5-134.hsd1.ca.comcast.net [24.6.5.134]) (authenticated bits=0) by lerdorf.com (8.13.6/8.13.6/Debian-1) with ESMTP id k441Errs012396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 3 May 2006 18:14:54 -0700 Message-ID: <4459558D.7050703@lerdorf.com> Date: Wed, 03 May 2006 18:14:53 -0700 User-Agent: Thunderbird 3.0a1 (Macintosh/20060414) MIME-Version: 1.0 To: "D. Dante Lorenso" CC: Jochem Maas , Rick Widmer , PHPdev References: <44584619.60400@lorenso.com> <200605030815.34801.johannes@php.net> <44585828.1030603@vocalspace.com> <44585E89.6000400@vocalspace.com> <44586BDF.6040600@developersdesk.com> <4459410D.9090802@vocalspace.com> <445942E9.201@developersdesk.com> <44594553.6020009@iamjochem.com> <44594A27.4040201@vocalspace.com> In-Reply-To: <44594A27.4040201@vocalspace.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Seeking 'coalesce' php internal function From: rasmus@lerdorf.com (Rasmus Lerdorf) Not sure what you guys are talking about. ?: is on the roadmap. -Rasmus D. Dante Lorenso wrote: > Jochem Maas wrote: >> point 1: regardless of how people think there should be an ifsetor() >> in the engine - the devs don't so there wont be one. > Arrrrvvhggghh! Don't you just want to scream! > >> point 2: anything trying to implement this functionality in userspace >> is a hack. (to stregethen that stance: Rasmus reiterated the point a few >> days ago [can't remember which mailinglist] that people should be >> trying to >> write *error free* code - ergo the error suppression is not a proper >> solution) > > Ok. You CAN NOT implement 'ifsetor/coalesce/filled' in userspace. And > the devs don't want it to exist ... so, WTF? >> Dante, live with the hack. :-) > Translate to: Dante, you don't need PHP to be better, adequate is good > enough. > > > Come on devs, I'm pleading with you. Say it isn't so. You force me to > write so much extra code unless this functionality exists in the core. > > Explain to me how every possible thing you might want to do to an array > gets it's own function in the language, but something as trivial as this > gets refused so strongly! > > I mean really: array_change_key_case, array_chunk, array_combine, > array_count_values, array_diff_assoc, array_diff_key, array_diff_uassoc, > ... > http://www.php.net/manual/en/ref.array.php > > You can't tell me that most if not all of these functions could not have > been implemented in userspace? I might use 10% of all the array > functions, but I'd use 'coalesce' and 'filled' daily. > > > Tell me at least this much. Can these two functions be implemented as > an extension? From what you know about PHP internals, does what WE want > have to be a language construct? If I can write coalesce() and filled() > as extensions, I'll submit a new extension/patch. Maybe it could join > PECL and with popularity make it's way begrudgingly into the core? > > Dante >