Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70428 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96909 invoked from network); 26 Nov 2013 19:53:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2013 19:53:46 -0000 Authentication-Results: pb1.pair.com header.from=bryan@ravensight.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=bryan@ravensight.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ravensight.org from 209.85.219.41 cause and error) X-PHP-List-Original-Sender: bryan@ravensight.org X-Host-Fingerprint: 209.85.219.41 mail-oa0-f41.google.com Received: from [209.85.219.41] ([209.85.219.41:55914] helo=mail-oa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/BB-39355-94CF4925 for ; Tue, 26 Nov 2013 14:53:46 -0500 Received: by mail-oa0-f41.google.com with SMTP id j17so6665066oag.0 for ; Tue, 26 Nov 2013 11:53:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :thread-index:content-language; bh=aZBsBe5/Z3fRLE33uQyy4Xex8A1PW5VprCjMXqH0lYs=; b=jQXGDu/zaEjWIftLlVTRhi4UNJEroffYbWFxZxhbNsAaVe+dZVffTVQcdTbSUWVZzM JEchlTh+6Rq6Yw2U+zhSvvAdm5LTWEYnPidmWWTp4UBaleNAWeg8V9qe9BlGaKb8sqxZ 6XNoWh6RuXYC1y5bjR03MsqWduNxxTbxPrrT0mIRykAisde9axQ3TaYfCHT0TugxdKNt NX4Mv32CotbRFV7tcoq5P/XP2kJyPJXZPYj9TyqZPbmFgZfhag1bsVlJjDvaQT68jNy0 DBhXsKMi9LpxeI7W9KP6mCUhaKpyAE8zRjcbVBc9PCJeOv5gstazbJtY8T/PJ1hSqs7Q ciiw== X-Gm-Message-State: ALoCoQmB7kxzjrc5XfmJD5Xg1Rq2IXCQqbZ3d8zVP42o/LfnukrmvBOHgWWGi0qJ5UjdHBRpwjXo X-Received: by 10.60.116.230 with SMTP id jz6mr31424927oeb.21.1385495622676; Tue, 26 Nov 2013 11:53:42 -0800 (PST) Received: from Genie (108-202-93-53.lightspeed.mssnks.sbcglobal.net. [108.202.93.53]) by mx.google.com with ESMTPSA id m7sm74516580obo.7.2013.11.26.11.53.41 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Nov 2013 11:53:41 -0800 (PST) To: "'Peter Cowburn'" , "'Jannik Zschiesche'" Cc: "'Mats Lindh'" , "'Chris London'" , References: In-Reply-To: Date: Tue, 26 Nov 2013 13:53:38 -0600 Message-ID: <001601ceeae1$33aab610$9b002230$@org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac7qx64QKWm9NypSR4CLcECi7/1C1gAGPRPA Content-Language: en-us Subject: RE: [PHP-DEV] [Proposal] Modification to ?: functionality From: bryan@ravensight.org ("Bryan C. Geraghty") -----Original Message----- From: Peter Cowburn [mailto:petercowburn@gmail.com] Sent: Tuesday, November 26, 2013 10:50 AM To: Jannik Zschiesche Cc: Mats Lindh; Chris London; internals@lists.php.net Subject: Re: [PHP-DEV] [Proposal] Modification to ?: functionality On 26 November 2013 15:32, Jannik Zschiesche wrote: > What are your (everyone's) thoughts on the following, given the current topic of discussion? > > $foo = $fo ?: 'default'; // see what I did there? > > I'm not sure changing the ?: to always use isset() is necessarily a good thing given my propensity for tiping mystakes. I don't like this change for exactly the reason Peter pointed out. I also thought about the fact that I often write a utility function to provide this functionality in my own code. The difference there is that I can remove the check and get the notices when debugging something. If this change were part of the language, that wouldn't be possible. Bryan