Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83433 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 426 invoked from network); 21 Feb 2015 21:35:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2015 21:35:43 -0000 Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.177 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.216.177 mail-qc0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:42303] helo=mail-qc0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/36-08895-E2AF8E45 for ; Sat, 21 Feb 2015 16:35:42 -0500 Received: by qcvp6 with SMTP id p6so6011386qcv.9 for ; Sat, 21 Feb 2015 13:35:40 -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:content-transfer-encoding; bh=Hcadr/DJhNXcaHlX/z3JF3KnU6Ddbi0FUpC/+I787hc=; b=yQJ6No6RXbItsgiFYPIMlU7nq90amdVhLoFknYNDUfrPay2kILWYze6wQAGiWCdbgr 6p7vpuZiLaaoh9f0RhaQOTwZ7PPzCvEbOHhVMlYsk40Cw2p0oRkBpxnjr3KTMRh/HB3r aHpQm/wZmgrglteUPe0QZgZH7J/ocrpny1MM95eug3cTBujWTg0pPrCGzRDDczRzf+/2 g9zx7yJc3EX0LxRY2mIf52x5JKqSZjPZ+lvRlbU1xjYLky5jTc79th4IDzpKk8Yf5Gws 1nXdh2jcbp8jzc+wIkT/XeHbn1JJM8e+qSft/9Nm7mFXt6HujL8wQZvru1V3i33n93Rv JSKQ== MIME-Version: 1.0 X-Received: by 10.140.148.20 with SMTP id 20mr9018805qhu.67.1424554540373; Sat, 21 Feb 2015 13:35:40 -0800 (PST) Received: by 10.96.160.99 with HTTP; Sat, 21 Feb 2015 13:35:40 -0800 (PST) In-Reply-To: References: <02a101d04af9$507484f0$f15d8ed0$@php.net> <02ff01d04b72$abae34a0$030a9de0$@php.net> <032801d04b8d$8ff3dce0$afdb96a0$@php.net> Date: Sat, 21 Feb 2015 22:35:40 +0100 Message-ID: To: Benjamin Eberlei Cc: "guilhermeblanco@gmail.com" , Dmitry Stogov , francois , Alexander Lisachenko , Nikita Popov , PHP Internals , Pierrick CHARRON , Pierre Joye , Zeev Suraski , Andi Gutmans , Joe Watkins , Yasuo Ohgaki , Sebastian Bergmann , Stanislav Malyshev , Rasmus Lerdorf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Annotations in PHP7 From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Wed, Feb 18, 2015 at 9:45 PM, Benjamin Eberlei wro= te: > > > On Wed, Feb 18, 2015 at 9:29 PM, Pavel Kou=C5=99il w= rote: >> >> As a Doctrine user, I find this way worse than current state. This >> syntax looks UGLY and contains a lot of useless clutter. And yeah, >> adding named parameters to PHP be pretty helpful to make annotations >> more readable. :( > > > This is in no way related, only by the choice of guilherme's syntax. You > could > pass an array of options to the constructor to simulate named easily. Sorry, but I find passing an array with fields instead of proper named parameters as a hack, not as a solution. :( >> >> And to what Francois said ("Anyway, I don't like the OO features >> people want to add everywhere. They can get strings and inject them to >> OO, but that's not the role of the annotation layer, IMHO. I >> definitely prefer the KISS approach."). What's exactly wrong with >> doing annotations in an object oriented manner? Both Doctrine >> Annotations and C# have them as objects, and it works well. Having >> annotations as just array of expressions/strings/whatever and needing >> another library to parse them is not really that great "upgrade" from >> current state. :( > > > PHP is not primarily an OOP language. As a user of Doctrine you wouldn't > need to care, > because we would wrap it anyway in our current code. So it wouldn't matte= r. > I know you could wrap it in your code, but that would still mean there would probably be multiple implementations of Annotations in the "wild", instead of a good complete functionality in the language itself. I know PHP is not primarily an OOP language, but Annotations IMHO make sense as classes, so I don't see any reason why would it be bad to make them in that way. Also, making Annotations be classes won't magically turn PHP into a primarily OOP language? Regards Pavel Kou=C5=99il