Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37033 invoked from network); 4 Nov 2014 21:42:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 21:42:17 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:43346] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/F5-02095-73849545 for ; Tue, 04 Nov 2014 16:42:16 -0500 Received: (qmail 21058 invoked by uid 89); 4 Nov 2014 21:42:13 -0000 Received: by simscan 1.3.1 ppid: 21052, pid: 21055, t: 0.0844s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.163.79.60) by mail4.serversure.net with ESMTPA; 4 Nov 2014 21:42:13 -0000 Message-ID: <54594834.7090809@lsces.co.uk> Date: Tue, 04 Nov 2014 21:42:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "internals@lists.php.net >> PHP internals" References: <5457AF2F.90808@php.net> <5457BDB7.8070701@garfieldtech.com> <54589A8D.3020607@sugarcrm.com> <1C3F4FA3-ABD5-4F6F-A898-F63AC1C723D5@ajf.me> <54591A76.8070302@sugarcrm.com> <967E30E5-71CB-40F8-9AE2-733D327DE197@ajf.me> <5459411E.9040106@lsces.co.uk> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Annotation PHP 7 From: lester@lsces.co.uk (Lester Caine) On 04/11/14 21:24, Sebastian B.-Hagensen wrote: > Just as a note: /** and /* are already treated differently by the > parser (T_DOC_COMMENT vs. T_COMMENT, this difference is also present > in opcache). > > Anyway, metadata/annotations/whatever you want to call them should be > seperated from comments and verbal descriptions on a > syntax level, not just by some conventions. It's one of the big > advantages of having them in the core. If your project needs to > support php5 you can still use doc-comments to store such data, even > if php7 gets first class annotations you may still parse the comment > in whichever way you want. By having a native way of defining them, > php would also avoid all possiblities of bc-breaks in libraries > consuming doc-comments. I take your point, except the bulk of my code already has this metadata using the current format. I either have to reformat it to some new 'php7' format ( but that will mess up php5 anyway? ), or I just carry on using the php5 format to avoid having code which is problematic IN php5? php5 needs this wrapped in comment blocks to hid it for BC reasons? > 2014-11-04 22:11 GMT+01:00 Lester Caine : >> On 04/11/14 20:18, guilhermeblanco@gmail.com wrote: >>> Primarily, I do not see docblocks as the right place to store class' >>> metadata information. Metadata != Comments. >> >> We use comment wrappers in many places to hide secondary material from >> other processes. Just rename docblocks -> metadata ... what is the >> problem? Now expand the docblock key words and one does not have to >> worry about clashes as it's all ring fenced. >> >> Is the material needed at runtime? In which case 'minimize' can strip it >> all. I can even see a case for /** being treated differently to /* and >> // blocks if needs be. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk