Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78664 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91933 invoked from network); 4 Nov 2014 18:30:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 18:30:13 -0000 Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:53635] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/3F-06676-43B19545 for ; Tue, 04 Nov 2014 13:30:12 -0500 Received: by mail-la0-f49.google.com with SMTP id ge10so1402287lab.36 for ; Tue, 04 Nov 2014 10:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=s1vSYBqjHWKm32t8LlnaVSnB19iYYH1yLD9FOS6nKBg=; b=URm15I7dUrlTI6S53Ho2mnSvWZhVxg8+c4Hazm89t1ljsDxF7TEYMdjC3HOTnXw0px cpoxFn/vO1wFJTZd3ctwCjr68xINNeXwGF8bNhWguj0xgtWVC65chqAKvN67VRWzRuBh //ziiuC58e4VzmAzSzjdQ1jmz2P8csn8He/7NT3J378UgLoTa15pCvZct8e3x9qTCh/1 xck1dCXDsjhV1JCVjp9vNUIfXExyfd9Ih1UOsTwbtNdMJowRkQxePvzW1SRmH2Z7tU4Y a2KX/PjN9Qts+lKuMTz3YsnEbUqyZjWJuiFwJF5tK7YQItTDFvDbbP8w/B7T64OqyaBz NoqA== MIME-Version: 1.0 X-Received: by 10.112.201.201 with SMTP id kc9mr62816864lbc.76.1415125807640; Tue, 04 Nov 2014 10:30:07 -0800 (PST) Received: by 10.152.46.172 with HTTP; Tue, 4 Nov 2014 10:30:07 -0800 (PST) Reply-To: marcio3w@gmail.com In-Reply-To: <54591838.8090502@gmail.com> References: <5457AF2F.90808@php.net> <5457BDB7.8070701@garfieldtech.com> <54589A8D.3020607@sugarcrm.com> <54591838.8090502@gmail.com> Date: Tue, 4 Nov 2014 15:30:07 -0300 Message-ID: To: Stas Malyshev Cc: Pierre Joye , Levi Morrison , PHP internals , Larry Garfield Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Annotation PHP 7 From: marcio.web2@gmail.com (Marcio Almada) > Reading it - http://doctrine-common.readthedocs.org/en/latest/reference/annotations.html - > it looks pretty big - strictly typed values, named > parameters, default constructors linked to properties, support for enum > types, support for typed arrays, separate constant syntax within > annotations. These are all features not supported in PHP, and it seems a > bit weird to me to have mini-language inside PHP that would support > these. And, of course, arbitrary depth recursive annotations, and for > some reason separate array syntax using {} and not []. From my point of view, most of this complexity is accidental. This happened mostly because, of course, we couldn't have parser / runtime errors inside doc comments. Once we have core annotations, oustide of doc comments, mostly of the DSL described in http://doctrine-common.readthedocs.org/en/latest/reference/annotations.html becomes unnecessary. 2014-11-04 15:17 GMT-03:00 Stas Malyshev : > Hi! > >> All projects mentioned in this thread use: >> http://doctrine-common.readthedocs.org/en/latest/reference/annotations.html >> That makes a pretty good base spec. > Reading it, it looks pretty big - strictly typed values, named > parameters, default constructors linked to properties, support for enum > types, support for typed arrays, separate constant syntax within > annotations. These are all features not supported in PHP, and it seems a > bit weird to me to have mini-language inside PHP that would support > these. And, of course, arbitrary depth recursive annotations, and for > some reason separate array syntax using {} and not []. > Moreover, there's extensive checking for annotations with exceptions > thrown if any of the above doesn't typecheck - I'm not even sure where > that would fit in PHP parser. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >