Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19827 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81272 invoked by uid 1010); 29 Oct 2005 21:56:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 81257 invoked from network); 29 Oct 2005 21:56:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2005 21:56:26 -0000 X-Host-Fingerprint: 69.64.38.41 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from ([69.64.38.41:58073] helo=bluga.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 2A/FF-02082-A00F3634 for ; Sat, 29 Oct 2005 17:56:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by bluga.net (Postfix) with ESMTP id 85F5621C77F; Sat, 29 Oct 2005 16:57:32 -0500 (CDT) Received: from bluga.net ([127.0.0.1]) by localhost (bluga.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09492-10; Sat, 29 Oct 2005 16:57:32 -0500 (CDT) Received: from [192.168.0.104] (CPE-67-48-78-96.neb.res.rr.com [67.48.78.96]) by bluga.net (Postfix) with ESMTP id 35C5721C0BD; Sat, 29 Oct 2005 16:57:32 -0500 (CDT) Message-ID: <4363F000.1030902@php.net> Date: Sat, 29 Oct 2005 16:56:16 -0500 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sara Golemon CC: internals@lists.php.net References: <4362C5F4.8090004@safesearching.com> <4e36d31d0510281847m3f54c70dy8b2a0679fa3c6cec@mail.gmail.com> <4362DFAB.1090701@safesearching.com> <43630958.4060406@php.net> <000e01c5dccc$e81f9470$6c051fac@lighthammer> In-Reply-To: <000e01c5dccc$e81f9470$6c051fac@lighthammer> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new using ClamAV at bluga.net Subject: Re: [PHP-DEV] what happened to that new isset() like language From: cellog@php.net (Greg Beaver) Sara Golemon wrote: >>> Evaluating an idea based on it's syntactic similarities to other >>> languages is complete and utter nonsense. It has nothing to with being >>> like language Xyz. It has to do with familiarity to language constructs. >>> One already understands the idea of 'this || that'. It's certainly >> >> >> I'll throw the water on this one: >> >> > $c = 0; >> $a = 1; >> var_dump($c || $a); >> ?> >> >> Changing true into false consitutes a rather severe BC break :). >> > How about ||| and |||= ? I don't think the meaning of this operator is obvious. Right now, the only operators whose meaning are not immediately obvious (in my eyes) are: @ - error suppression & - make reference in some cases, bitwise and in others ^ - bitwise xor but what are you gonna do :) For an operation as complicated as "use the first variable that exists" I would be most comfortable with: $d = first-existing: $a, $b, $c; This way, no conflict with functions (parse error in previous php versions), and it is extremely clear. The parser would look for T_FIRSTEXISTING ':' existing_varlist in the expression section, and of course defining existing_varlist as: existing_varlist: variable | existing_varlist ',' variable ; Greg