Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40804 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50989 invoked from network); 30 Sep 2008 06:31:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2008 06:31:29 -0000 Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.169 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 66.249.92.169 ug-out-1314.google.com Received: from [66.249.92.169] ([66.249.92.169:54714] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/4E-36431-0C7C1E84 for ; Tue, 30 Sep 2008 02:31:29 -0400 Received: by ug-out-1314.google.com with SMTP id k3so508810ugf.37 for ; Mon, 29 Sep 2008 23:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=NWm7KxLq4xkuDuCzSmPlnGAPFFIQSHEi5R+JkyzlXJk=; b=X8nQ8bTFVo8fDPGZdMRkv+djrO5AaRL28G9GvTC4nj1F1bZ5fL0iOPLuQAOVKEAYAA 8qaaayga2Nq9nM5p7xN+9JOHzhTXunMkLwIG/21jrkkLM6qi5OF+3qmdI7jKeSTWdsFz A25N7nzQSvICOJ4H4rs5+hugWGReqK1+iMEQM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=w2cF5R2wSB8XSRVO7/lt+Wpx3yc5dOaEWikfLBneFBiT2zMPL5JsydGPI5IQRb7A7r Rwk53nXtu+uSf6nzvYtXeHcGnvMYOPxNJ+ZJeERbxN1nKFFycwF96SEzeFOAA1HkBvTc ntNBAT8eAfdZmw8nWQ7s5z739O2UXn58MEh68= Received: by 10.66.236.13 with SMTP id j13mr1214229ugh.7.1222756285823; Mon, 29 Sep 2008 23:31:25 -0700 (PDT) Received: by 10.67.98.20 with HTTP; Mon, 29 Sep 2008 23:31:25 -0700 (PDT) Message-ID: <9b3df6a50809292331j7d02ad42mf5139e200bea7e1c@mail.gmail.com> Date: Tue, 30 Sep 2008 09:31:25 +0300 To: jvlad Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_46187_27912502.1222756285833" References: <9E3A4397-3595-42D8-BF73-7F7575B93772@pooteeweet.org> <9b3df6a50809290905w3ef8bee7jde8f34e0ad1c9ffd@mail.gmail.com> <200809291835.45551.et@php.net> <200809291924.55553.lew21st@gmail.com> Subject: Re: [PHP-DEV] alpha3 From: arvids.godjuks@gmail.com ("Arvids Godjuks") ------=_Part_46187_27912502.1222756285833 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/9/29 jvlad > > > > So as prevoius speaker suggested, and I personaly got to conclusion > in > > > > other thread that ":" is ideal. Short, isn't taken. > > > > > > $a = $b?A:B:C:D; > > > > Will _you_ write such code? No. Will anybody from this list write such > > code? > > You may want to write > $a = $b?A:B:C > and how would php compiler resolve A:B:C? > A:B vs C > or A vs B:C? > > To me it's better to stay with :: > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > We have (), so just do $a = $b ? (A:B:C:D) : blah(); Document, that namespaced calls should be in () with ternary operator and make it a parse error if coder forgets it. That's a good compromise and little to pay for namespaces, and doesn't break any BC. I think using ternary operator in such cases isn't realy wise - if () { } else {} is far more appropriate (anyway, I'l beat my coders for such usage of ternary operator). So as other members of this thread mentioned - would you really write code like this: $a = $b?A:B:C:D; Are you? Me 100% not. ------=_Part_46187_27912502.1222756285833--