Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78685 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33474 invoked from network); 4 Nov 2014 21:24:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 21:24:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=sbj.ml.read@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sbj.ml.read@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.193 as permitted sender) X-PHP-List-Original-Sender: sbj.ml.read@gmail.com X-Host-Fingerprint: 209.85.223.193 mail-ie0-f193.google.com Received: from [209.85.223.193] ([209.85.223.193:44146] helo=mail-ie0-f193.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/45-02095-62449545 for ; Tue, 04 Nov 2014 16:24:55 -0500 Received: by mail-ie0-f193.google.com with SMTP id rd18so2064667iec.0 for ; Tue, 04 Nov 2014 13:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UCkvz8CeyaeuHvpLHzJCMVG9/HWPditBJrg8y4O8aSo=; b=NzDq9N6c/T0jL8vj2n+QYav5CmzLjkvvQdbnLrIzGQmT4SHAtIg6Jsz6zNOnyS9Pof +ShZeZxhDIjMgrOVOUewtNVkahp1eaDke/L77TBYbajsYy6FqQVMXwsjexXnrLO0g/Pb +WsVkrMdBXuRqtCRRAk5zpOqm5ii5kyocoKVEXkl+zdoZlRYiTnd+rNqy0xN4S+7rBfe YZvSa8Zlo7mKb5XsU+UcBog82IOVxE73jqb6u+u9VBMiayngZ7RfCvXm/2cYC6TkV4Vn cfsbTTO7nqilX3XNrRo89+DhF53GGjvSaZDB1bvp0oFHqEaxcI/zU14cb7gqCCSsIj3r 7DWQ== MIME-Version: 1.0 X-Received: by 10.50.111.234 with SMTP id il10mr26818008igb.23.1415136290393; Tue, 04 Nov 2014 13:24:50 -0800 (PST) Received: by 10.107.54.12 with HTTP; Tue, 4 Nov 2014 13:24:50 -0800 (PST) In-Reply-To: <5459411E.9040106@lsces.co.uk> 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> Date: Tue, 4 Nov 2014 22:24:50 +0100 Message-ID: To: Lester Caine Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Annotation PHP 7 From: sbj.ml.read@gmail.com ("Sebastian B.-Hagensen") 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. 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >