Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24676 invoked from network); 12 Dec 2014 09:01:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2014 09:01:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=bradley@legalweb.org.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bradley@legalweb.org.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain legalweb.org.uk designates 188.39.106.5 as permitted sender) X-PHP-List-Original-Sender: bradley@legalweb.org.uk X-Host-Fingerprint: 188.39.106.5 mail.legalweb.org.uk Received: from [188.39.106.5] ([188.39.106.5:49077] helo=fidanza.legalweb.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/A0-18848-6DEAA845 for ; Fri, 12 Dec 2014 04:01:12 -0500 Received: from localhost (localhost [127.0.0.1]) by fidanza.legalweb.org.uk (Postfix) with ESMTP id 1EE0515A8 for ; Fri, 12 Dec 2014 09:01:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=legalweb.org.uk; h=content-transfer-encoding:content-type:content-type :in-reply-to:references:subject:subject:mime-version:user-agent :from:from:date:date:message-id; s=default; t=1418374856; x= 1420189257; bh=QJUtUTC+jTEVFx3qaTvi5Iv8g/1+XRSLhEwcy/HENSc=; b=L 5rTysnqamuMJB6G6dLSLYwx8s3dsjbc0fXWATIgwYte66Pdk5AsvSPUkQwJsZM2L vgCP7nMVA3umtCDNFbvVbYibozi2TOwIHnZ34B/8l8wKTyJ/KinWhZk3y/Us0oSo 2HIQ4T7luax49bbQM1lDdVcPXAFKfKJgGndnSwo51w= X-Virus-Scanned: Debian amavisd-new at mail.legalweb.org.uk Received: from fidanza.legalweb.org.uk ([127.0.0.1]) by localhost (FIDANZA.legalweb [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Y3YYRvQVCWHv for ; Fri, 12 Dec 2014 09:00:56 +0000 (GMT) Received: from [192.168.170.85] (188-39-106-2.static.enta.net [188.39.106.2]) (Authenticated sender: bradley@legalweb.org.uk) by fidanza.legalweb.org.uk (Postfix) with ESMTPSA id AA4A673 for ; Fri, 12 Dec 2014 09:00:56 +0000 (GMT) Message-ID: <548AAF17.6030702@legalweb.org.uk> Date: Fri, 12 Dec 2014 09:02:15 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <95A581EE-A062-4926-BE44-BCA87FC9B356@fb.com> <9230CB24-22FC-4A0E-A9D5-F02523B65A02@ajf.me> <54894936.9030003@gmail.com> <5489BF99.2070505@gmail.com> In-Reply-To: <5489BF99.2070505@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Nullsafe calls From: bradley@legalweb.org.uk (Bradley Weston) I agree, doing lots of if statements gets bloated. Someone would only use this method if they was comfortable with it either returning null or the desired result. On 11/12/2014 16:00, Rowan Collins wrote: > guilhermeblanco@gmail.com wrote on 11/12/2014 15:57: >> Not trying to demerit the proposal, but accepting ?-> and black magic >> just >> seems wrong, very wrong. >> You need to write defensive code, not rely on the language to do that >> for >> you. > > But surely if you're consciously deciding to use this feature, it *is* > defensive code - just defensive code involving less copy-and-paste of > if ( ! is_null($blah) )... >