Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10987 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96306 invoked by uid 1010); 8 Jul 2004 18:48:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96185 invoked from network); 8 Jul 2004 18:48:10 -0000 Received: from unknown (HELO mx.thebrainroom.net) (69.55.226.195) by pb1.pair.com with SMTP; 8 Jul 2004 18:48:10 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id AC55D1488036; Thu, 8 Jul 2004 11:48:09 -0700 (PDT) Received: from BAUMBART (p508EBB70.dip.t-dialin.net [80.142.187.112]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with ESMTP id 673261488034; Thu, 8 Jul 2004 11:48:06 -0700 (PDT) Date: Thu, 8 Jul 2004 20:48:11 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1502109509.20040708204811@marcus-boerger.de> To: Jay Smith Cc: internals@lists.php.net In-Reply-To: <20040708153130.29628.qmail@pb1.pair.com> References: <20040708002654.7442.qmail@pb1.pair.com> <1093095066.20040708032739@marcus-boerger.de> <20040708140845.13476.qmail@pb1.pair.com> <20040708153130.29628.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=0.8 required=5.0 tests=PRIORITY_NO_NAME autolearn=no version=2.63 X-Spam-Level: X-TBR-Filter: Virus scanned and defanged Subject: Re: [PHP-DEV] what happened to that new isset() like language construct From: helly@php.net (Marcus Boerger) Hello Jay, Thursday, July 8, 2004, 5:31:08 PM, you wrote: > Marc Richards wrote: >> >> Well I'm partial to ?: and there seemed to be some support for it, but >> there also seemed to be a non-trivial (though not necessarily difficult) >> amount of work to get it to work right. >> >> ifsetor() is obviously less concise, but also the name at first glance >> is a little non-obvious/confusing. I suppose isset() suffers from the >> same problem, and people will eventuall get used to it. >> >> If the technical problems can be overcome, I'm all for ?: otherwise >> ifsetor() seemed like the best suggestion so far. I am far less >> qualified to come up with an alternative than the more experienced >> PHP'ers out there. >> >> >> Marc > As far as the name is concerned, I'm kind of partial to coalesce(), as the > purpose of the function is really similar to the SQL function of the same > name. This is from the Postgres manual, although I think the function > itself is from SQL99: ifsetor is different. It only takes one variable and an optional default value (any expression). "ifsetor" "(" [ "," ] ")" Changing it to accept a list of *variables* could probably be possible but would require heavy restructuring of the compiler. The same is true for chaning it to accept a variable plus a list of expressions is even more complicated. Best regards, Marcus mailto:helly@php.net