Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61750 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80024 invoked from network); 25 Jul 2012 09:24:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2012 09:24:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:60838] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/6F-27263-B5BBF005 for ; Wed, 25 Jul 2012 05:24:44 -0400 Received: by lago2 with SMTP id o2so390887lag.29 for ; Wed, 25 Jul 2012 02:24:40 -0700 (PDT) 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=raA2cKAxwFRpWMgAsv60uPMUBPKRYiOgOiv7KZhR8CI=; b=glvFzYRj0XgEHCoiebTdSdvThZa+BJ1Juy3VErof1B4COIoFFfLFyVg45T2WPjTBpb e8MDfkF/TKbufLA5Yo44NSf7nDyMtWWM26jav+ZhK70F+WiefbL1yyPxlfJM9W2ePEmO UjLls7UweQETJ2VbvxgeX3wAITsrVUERS/0jdP8G5SUEp+W0AQkz87vqSLVaolZXkpV9 PH6dPOQ0tYmaBUqZqGR8bZLOS+8aXDpSJZSbTpUr08InNYRxjPNeU70/glUNSsnImX+7 imzIvHfTm1eOj0jbjzrGlreGoBrG3mnPJn9KAgSNDEx4UP69XTW37LMbns4UferlVWfg iRZQ== MIME-Version: 1.0 Received: by 10.152.104.77 with SMTP id gc13mr24993764lab.31.1343208280482; Wed, 25 Jul 2012 02:24:40 -0700 (PDT) Received: by 10.112.26.234 with HTTP; Wed, 25 Jul 2012 02:24:40 -0700 (PDT) In-Reply-To: <500FB531.6000906@lsces.co.uk> References: <500EDCC7.1020402@ajf.me> <500EE3B9.8010902@ajf.me> <500EEA76.1030407@ajf.me> <500FB531.6000906@lsces.co.uk> Date: Wed, 25 Jul 2012 05:24:40 -0400 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: Generators in PHP From: theanomaly.is@gmail.com (Sherif Ramadan) >> Just between PHP 5.2 and 5.4 we've gained traits, closures, >> namespaces, function array derefrencing, access to member upon >> instantiation, and lots of other lovely additions to the language. I >> don't see languages like Java or Python evolving this quickly -- by >> contrast. > > > But now we also need the people who insisted that these were essential > coming up to the plate and producing good documentation on how they should > be used properly. As yet they are not adding anything to MY existing code > base except hassle. > > All these 'extras' may seem 'sexy' to some people, but if there is no > pressing need to use them why would many of us bother? Apart from later > having to debug some third party library that has been 'sexed up' with the > latest gismoes and which is almost unreadable due to the shortcuts it uses. > > ( I'll start a new thread for my other rant ... ) > I don't see anything about these particular features that isn't already documented. Albeit there are parts of the documentation that could always use a bit of refinement every now and then. With that said, the manual isn't a place to tell people "how" a particular feature should be used, but how it "can" be used and to what consequence. The actual use is left up to the developer and we all know there is more than one way any given developer likes to implement things in any language. In an effort not to devolve this thread into something it's not I'd like to reposition that towards generators. In order for PHP features to end up getting implemented and committed into PHP there's a lot of real estate invovled. For one, you have to have enough developer interest around the feature to begin with. In the last 24 hours alone there has been significant activity in this thread (and over 50 responses total in the last few weeks). Two, you need the have core developers motivated enough to spend the time in actually writing up the implementation and getting it shipped. That involves a lot of other intricate work so someone that isn't focused or motivated enough isn't going to get very far. This also means more core developers have to jump in if the feature gets into a release version where maintenance and bug fixes come into play (after all you can't test everything until you release it into the wild and get people to discover new edge cases). Three, it has to prove useful enough that people could not easily achieve the functionality without language addition. Otherwise it eventually becomes tainted and dies off (take mysql_* as an example). All the PHP developers I've spoken with over the past few weeks that now about the generators RFC are very excited to see it come to PHP. Especially those developers that have worked with generators in other languages and know of its usefulness. As for those who don't know about it yet -- give them a chance. They may like it (of course some may not). We're not here to discuss it's popularity, but it's usefulness and feasibility. It's too early to start debating anything else.