Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43507 invoked from network); 12 Jan 2013 15:54:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 15:54:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:48594] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/E2-24230-14781F05 for ; Sat, 12 Jan 2013 10:54:42 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 5E1FF10D88F; Sat, 12 Jan 2013 15:54:37 +0000 (GMT) Date: Sat, 12 Jan 2013 15:54:37 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Nikita Popov cc: Stas Malyshev , PHP internals In-Reply-To: Message-ID: References: <50F0FB3B.2090509@sugarcrm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [VOTE] array_column() function From: derick@php.net (Derick Rethans) On Sat, 12 Jan 2013, Nikita Popov wrote: > On Sat, Jan 12, 2013 at 6:57 AM, Stas Malyshev wrote: > > > This is a great illustration of different visions we have here. On > > one hand, we have practical, immediate feature that covers a clear > > use case and does not add any constructs or complexity to the core > > language and services immediate need, covering several lines of > > frequently encountered boilerplate code with one function. > > > > On the other hand, we have a possibility to have in the future a > > fashionable syntax, which is a bit better, more concise and "cool > > looking" expression for what foreach already can do. > > > > Stas, I think you are misrepresenting this a bit. It's not about > adding something "cool looking", it's about adding a feature that > solves *this and many more* problems in a consistent way. A way that > does *not* require to add a new function for every single array > manipulation. > > I know that not everyone agrees with that philosophy, but I personally > don't like to add new features that can be easily covered by more > general solutions, or features that just represent a hack because the > more general solution isn't implemented yet. By more general you mean extra special new OO constructs? Sorry, but PHP should also be useable by non-CS majors. And so what we have 76 (soon 77!) array functions? > This is also the reason why I don't particularly like your argument > skipping proposal, because it's just a hack around the lack of named > arguments. Argument skipping is a language construct, this just adds a new function to the 2000 we already have. Quite a different matter. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine