Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66429 invoked from network); 8 Mar 2014 22:33:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2014 22:33:21 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.241 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.241 imap3-1.ox.registrar-servers.com Received: from [198.187.29.241] ([198.187.29.241:53120] helo=imap3-1.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/13-44862-FAA9B135 for ; Sat, 08 Mar 2014 17:33:19 -0500 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id 8ABD52A0053; Sat, 8 Mar 2014 17:33:16 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap3.ox.registrar-servers.com Received: from oxmail.registrar-servers.com ([127.0.0.1]) by localhost (imap3.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Gqg7KmgYNjJk; Sat, 8 Mar 2014 17:33:16 -0500 (EST) Received: from [192.168.0.8] (unknown [90.203.28.187]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 40CF92A007B; Sat, 8 Mar 2014 17:33:14 -0500 (EST) Content-Type: multipart/alternative; boundary="Apple-Mail=_9D2BFC5B-2EB3-4EDB-A438-470FAD62E1E3" Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: Date: Sat, 8 Mar 2014 22:33:11 +0000 Cc: internals Message-ID: <29BDF40C-562D-4943-877B-70701335D3AA@ajf.me> References: <03CFE6C6-0742-4928-BD2B-E9C920E9246A@ajf.me> To: Marco Schuster X-Mailer: Apple Mail (2.1874) Subject: Re: [PHP-DEV] Idea: ifdef-like feature to ease userland BC From: ajf@ajf.me (Andrea Faulds) --Apple-Mail=_9D2BFC5B-2EB3-4EDB-A438-470FAD62E1E3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 8 Mar 2014, at 21:48, Marco Schuster wrote: > This breaks if you use new syntax features like the array shortcut > $var=3D[];, traits or similar. Right, but those aren=92t problems. I can=92t see anyone willingly = writing: #ifdef PHP_5_4 $a =3D [1,2,3]; #else $a =3D array(1,2,3); #endif They will simply write: $a =3D array(1,2,3); For traits, again, it=92s unlikely people will want to write two sets of = code and deliberately duplicate things. They=92ll simply just not use = traits. The only case where what you=92re saying makes sense is where features = are removed in favour of alternatives, and I can=92t see that happening = for any syntactic features. -- Andrea Faulds http://ajf.me/ --Apple-Mail=_9D2BFC5B-2EB3-4EDB-A438-470FAD62E1E3--