Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82050 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67185 invoked from network); 6 Feb 2015 15:19:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 15:19:44 -0000 Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.179 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.213.179 mail-ig0-f179.google.com Received: from [209.85.213.179] ([209.85.213.179:59169] helo=mail-ig0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/76-45146-F8BD4D45 for ; Fri, 06 Feb 2015 10:19:44 -0500 Received: by mail-ig0-f179.google.com with SMTP id l13so3396180iga.0 for ; Fri, 06 Feb 2015 07:19:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=EH/sckmh9EjRNAkLTof+qvtrFyJSfc9RcE91il3lyf0=; b=K+Xt8WOlbCmOahyciOIHok51o3tDC9TvWQHtvleu0rcq4KVhGH5ZaXMETIDkbZ0Bz6 rlcqPiqW+DoRajOfoTAC93W0qkAZxMCtNZk3sv1HJW1X2kmDj9s/Vp2Y9qv1cRIq5OcP xg6vch02frHpcl8qp0ZNaXOCHaNH/RscXMBTkADb49oEDzMPuVZkZAwMwmG805A9fcmG oeU7TlVZP5Glr7WezdlNvsvFgCdaX1JPRad4vJjuZZ+SoVqxyMO6GDWxsjEKl2FVhO+x 1oKQY7POO4gnOtPaKtNCP84+D2qglN+Mguc2AzcuV19NY7/mUjJ0SFiW7a8FR9rLHPx7 4v6Q== X-Received: by 10.107.131.66 with SMTP id f63mr184552iod.32.1423235981194; Fri, 06 Feb 2015 07:19:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.238.75 with HTTP; Fri, 6 Feb 2015 07:19:19 -0800 (PST) In-Reply-To: References: <54D37D41.2030706@hoa-project.net> <54D470FA.6000303@hoa-project.net> <02d301d041f3$0c5f3990$251dacb0$@tekwire.net> <031501d04217$b393bff0$1abb3fd0$@tekwire.net> Date: Fri, 6 Feb 2015 10:19:19 -0500 Message-ID: To: Dmitry Stogov Cc: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , Yasuo Ohgaki , Pierre Joye , "Ivan Enderlin @ Hoa" , PHP Internals Content-Type: multipart/alternative; boundary=001a113eb70e175f10050e6cf350 Subject: Re: [PHP-DEV] Design by Contract From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --001a113eb70e175f10050e6cf350 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Dmitry, Actually the RFC was approved by 1 or 2 votes more than needed, but the overall response from core maintainers was that it was overly complex, adding features the language did not support until that point (named parameters, short array syntax as examples), it was broken with the proposed opcache merge (was not a trivial fix IIRC) and memory expensive. I think a simpler approach could work now as I suggested in previous messages. It does not add new features besides annotations itself. We'd still have to discuss about the memory usage and where the metadata class instances should be placed. []s, On Fri, Feb 6, 2015 at 10:12 AM, guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > Dmitry, > > Doc comments are terrible. I really want you to spend some time looking a= t > what we had to do inside of Doctrine Annotations to make it work. We have > to token_get_all() the file to be processed and track for "use"s to allow > importing inside of doc blocks. We also had to build a top-down recursive > parser to make it work... don't you think it's too much? As one of the > library maintainers, I do, by heart. > > We have until Mar 15 to work on something and propose. I can work on it > without any problems, but as an enthusiast of PHP, it's very frustrating > that I spend time to make PHP better and none even care to review PRs or > simply ignore messages on php-internals. If anyone compromise to review, > I'd do my best to get it ready yesterday if it was possible! > > Thanks, > > On Fri, Feb 6, 2015 at 9:40 AM, Dmitry Stogov wrote: > >> I see your point, and, of course, it makes sense, but it also means that >> no >> new PHP7 features might not be used in these frameworks and libraries fo= r >> a >> long time. Should we stop add new features in major releases? >> >> As I said, according to DbC, I'm not sure if it should be defined on >> language level. Doc comments or annotations with external tools might be >> good enough. >> >> Thanks. Dmitry. >> >> On Fri, Feb 6, 2015 at 5:17 PM, Fran=C3=A7ois Laupretre >> wrote: >> >> > > De : yohgaki@gmail.com [mailto:yohgaki@gmail.com] De la part de Yasu= o >> > Ohgaki >> > >> > > Personally, backward compatibility is not too important. >> > > PHP5 is dead by PHP 7.2 release... This is the reason why. >> > > It's only 3 years later, only 2 years later after PHP 7.0 release. >> > >> > That's where we disagree, as I think it's most important. >> > >> > Thinking that PHP 5 is dead in 3 years is extremely na=C3=AFve IMO. Yo= u >> > probably didn't live the PHP 4/5 migration but I guess we won't have >> more >> > than 30 % of production servers under PHP 7 in 2018, just due to the >> delays >> > of distros, hosting companies, and others. >> > >> > Now, suppose you're distributing a library or a framework, like Symfon= y, >> > Doctrine, etc. Someone tells you : "Here's the new DbC feature. You ca= n >> use >> > it but this implies splitting your code to two independent branches an= d >> > maintain them in parallel until you have no PHP 5 customer anymore.". >> What >> > do you think you'll do (or won't do) ? >> > >> > @Pierre,@Dmitry : you have a better vision than mine on the migration >> > process. What's your opinion on forcing software developers to maintai= n >> two >> > separate branches ? >> > >> > Once again, the conditions in @assert lines ARE PHP code. There's no n= ew >> > syntax. There is no real difference between writing >> 'assert()' >> > and '@assert ', especially if the require/ensure blocks >> should >> > contain 'assert' statements only. >> > >> > > What I believe is not important to you. I could be wrong. >> > >> > It is important. As I may be wrong too. >> > >> > Cheers >> > >> > Fran=C3=A7ois >> > >> > >> > > > > -- > Guilherme Blanco > MSN: guilhermeblanco@hotmail.com > GTalk: guilhermeblanco > Toronto - ON/Canada > --=20 Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --001a113eb70e175f10050e6cf350--