Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37942 invoked from network); 26 Nov 2015 14:54:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2015 14:54:16 -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.43 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:38551] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/60-35358-61D17565 for ; Thu, 26 Nov 2015 09:54:15 -0500 Received: by wmec201 with SMTP id c201so25543538wme.1 for ; Thu, 26 Nov 2015 06:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=vWho4KIpRun9ndMUgvxyn9506WQpRF8pWOvz6Se+m/o=; b=TY6jjDWcY33ZyIBr9+tV1D4BzBoeZiOInC1lZOie0tWPdhhJUwrMheOQkh9n7Eegb3 14KneUh6YPxzCAD4fsS04BLSANtK3ZJv9oGBua8A7Gkk4h4ZLoHLta0TQ56weXCgH3nf iuYMJzr1p2y1FElNplHQ41auGf9F/KXSi0Co7cljTMMI44c7BAuDeHuBhzdJmHWqUDlw WwzowcKTwXVizZiWQlc8PysmaxaCalVua0TqbE9JUOF6xNTaJolzLVHjjod6PY9obZUm M3UhgKiRhg40HDXl41yBSumf8bFcjEo6Pb+vHOCPOmYRSHXTXTkmv/hrDMDtj0r8wVjU BHlg== X-Received: by 10.28.128.5 with SMTP id b5mr3972220wmd.25.1448549651609; Thu, 26 Nov 2015 06:54:11 -0800 (PST) Received: from [192.168.0.147] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id h67sm3050059wmf.17.2015.11.26.06.54.10 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Nov 2015 06:54:11 -0800 (PST) To: PHP internals References: <5654B516.4020700@gmail.com> <5655D82A.8020304@lsces.co.uk> <5655E4E4.8070200@garfieldtech.com> <5655E61E.3000904@gmail.com> <5655E93F.90506@gmail.com> <5655F24B.6020401@garfieldtech.com> <5655F47C.3060504@gmail.com> <1B1E6CD7-2378-43CA-A636-83383707AF8E@gmail.com> <5656D99F.10707@gmail.com> Message-ID: <56571CD7.8030403@gmail.com> Date: Thu, 26 Nov 2015 14:53:11 +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) Hi Pedro, I agree with most of the points in your last mail. At the end of the day, the reasons are fairly subjective, and relate to how the feature will be perceived, and the freedom to design it without annoying people, but that doesn't stop them being real. However I would like to come back on this one: Pedro Cordeiro wrote on 26/11/2015 11:46: > 4) You've suggested disregarding docblock stripping from transpilers > and obfuscators, because they are not first-class citizens, even > though those are part of the PHP ecosystem and affect users. You're putting words into my mouth there; I never said to disregard the tools themselves, I disputed that they will be disadvantaged by one syntax over another. Transpilers and obfuscators will have to make changes either way, if they are to support annotations; the nature of those changes is different inside and outside docblocks, but that doesn't seem that big a deal to me. Whatever the syntax, they will have to do two things: 1) parse the source code for annotations, adding them to whatever AST or similar they use; 2) output those annotations (with any relevant transforms) in the appropriate syntax. I don't see /** @Foo(42) */ as fundamentally harder to do that with than << Foo(42) >>, or whatever other syntax anyone comes up with. Other than this point, this e-mail is a much better summary of why docblocks should not be used than any details about which of two syntaxes (that we haven't invented yet) parsers might or might not find harder. As I say, apologies for side-tracking the conversation for so long, I was intending it to be one decision among many, and wanted to make sure we'd captured a good reason for the decision, so that it could be justified in future. Regards, -- Rowan Collins [IMSoP]