Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89415 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33654 invoked from network); 25 Nov 2015 17:01:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2015 17:01:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wm0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:32872] helo=mail-wm0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/A2-19088-979E5565 for ; Wed, 25 Nov 2015 12:01:46 -0500 Received: by wmec201 with SMTP id c201so265766882wme.0 for ; Wed, 25 Nov 2015 09:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=eLPtTl34NS4KWmyudJ/7b1J7NFwdw3tN7LNLEQbKlo4=; b=aGX7L+fAjSiSLwWMHBDwTFugIaOe4VM2eFhAU5JX1EOqBMsHqFZdfqDzOnV9w6CByr XXCDARdbyNHF+CmHA9MSqh/S56lmA2U+K69dz6bilIh90RKulfeGR4LAENVAw53s9VNB a6u25LH2zvMIhFja39VJgYmdjlUT71DjlvnG2yUhGI/aKl0lpl/i+QFeOWnO0Jbve+3z OVvcgNmGRh3s24bil+wvtu76RNPxIkFdbAFHHfL63vi46/zrLvhKpnwGXZJyyleTr/2F hxK/It3379HnFqZIAD4gOQBP8UoNKTx4Kr3oWy4w7tIIa4cNmyQr0SAVcM2Cn2HwYXa/ 7NGg== X-Received: by 10.194.63.142 with SMTP id g14mr43476406wjs.161.1448470903018; Wed, 25 Nov 2015 09:01:43 -0800 (PST) Received: from [192.168.0.147] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id q77sm4358189wmd.22.2015.11.25.09.01.42 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Nov 2015 09:01:42 -0800 (PST) References: <5654B516.4020700@gmail.com> <5655D82A.8020304@lsces.co.uk> <5655E4E4.8070200@garfieldtech.com> <5655E61E.3000904@gmail.com> To: PHP Internals Message-ID: <5655E93F.90506@gmail.com> Date: Wed, 25 Nov 2015 17:00:47 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Native Annotation Syntax From: rowan.collins@gmail.com (Rowan Collins) Pedro Cordeiro wrote on 25/11/2015 16:53: > Rowan, even if they are not harder, there is no reason to keep this > feature in docblocks. Well, I can think of one reason: backwards compatibility. I don't mean with current frameworks - as you say, these are not currently standardised, so some will need to be adapted whatever is implemented in core - but with older versions of PHP. If we invent new syntax, then any code using that feature must *require* the version of PHP that introduces that syntax, because previous versions will simply throw a syntax error. There are a few ways around this, such as: - allowing the annotation to be preceded by // as Sara suggested (or maybe #, to make it look like a C pre-processor directive) - using some other syntax that is currently a no-op, like ECMAScript's wacky "use strict" But ultimately, these end up having the same disadvantages you're claiming for docblocks - they look like things you can delete, or which has some other purpose, but are actually vital to the operation of the code.# I don't feel that strongly in favour of docblocks, but I don't think the reasons given against are particularly strong. Regards, -- Rowan Collins [IMSoP]