Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18858 invoked from network); 17 Jul 2012 10:31:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2012 10:31:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajfweb@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajfweb@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: ajfweb@googlemail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:54955] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/04-28715-2EE35005 for ; Tue, 17 Jul 2012 06:30:59 -0400 Received: by weyr1 with SMTP id r1so181600wey.29 for ; Tue, 17 Jul 2012 03:30:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WNvQXn9zC5nNo0i7VWNJMuv/6Y8uCha7f1nxdRVZKI0=; b=0froBNuPXtPsq+Xl5Vv+Qkbe76odzN2Qjyjp+P0RG+iVKCmzilD9alhMvKMTrxVbH4 KjEL4s9pzsrGcASmZhnb1qQ9+WF/HPMxs7Qi03B/GY1gHJVcXVbppJjv+w8CQoxfB8mI s/u1sYmJxxBgs9YfOZILlxKRIsm5+ryeOCYbbMo3mprvcVzTEUKCeYE6W2dHd0P+hR2F GEM4NThnVdydkVh8mniyT6jioF9cmQOotERhmxlV5lDWpuezOTRIfNvsfNoeCmQBzyZH jdAzRRKWZYNUZqp2rbgh3nOYrttGomOg3K2kJEmRa2t3xYAZZdVduv5uLkY8TMFRCETG wqiA== MIME-Version: 1.0 Received: by 10.216.220.89 with SMTP id n67mr1208511wep.73.1342521055543; Tue, 17 Jul 2012 03:30:55 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Tue, 17 Jul 2012 03:30:55 -0700 (PDT) Received: by 10.216.160.16 with HTTP; Tue, 17 Jul 2012 03:30:55 -0700 (PDT) In-Reply-To: <9df59951c29cafc8937404409fb9fe70@nebm.ist.utl.pt> References: <9df59951c29cafc8937404409fb9fe70@nebm.ist.utl.pt> Date: Tue, 17 Jul 2012 11:30:55 +0100 Message-ID: To: Gustavo Lopes Cc: Pierre Joye , internals Content-Type: multipart/alternative; boundary=0016e6d77ce39e809404c5040ad1 Subject: Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.) From: ajfweb@googlemail.com (Andrew Faulds) --0016e6d77ce39e809404c5040ad1 Content-Type: text/plain; charset=UTF-8 I might not have made it clear, but the main reasons I want it are: - Chance to clean up array/string/etc APIs - Looks nicer IMO, slightly clearer what functions do and affect On Jul 17, 2012 11:21 AM, "Gustavo Lopes" wrote: > On Tue, 17 Jul 2012 12:07:09 +0200, Pierre Joye wrote: > > On Tue, Jul 17, 2012 at 2:12 AM, Gustavo Lopes >> wrote: >> >> Adding method call >>> syntax to arrays hardly makes PHP more object oriented. Syntax is >>> unimportant. There's no substantial difference between array_slice($arr, >>> ...) and $arr->slice(...). >>> >> >> There is a huge difference. One of the main difference would be to >> finally have an uniform API and not this painful inconsistent APIs we >> have to maintain. >> > > There isn't a difference in terms of making PHP more object oriented, > which was the main advantage advanced by the OP. I'm all for redesigning > strings/arrays APIs (presented as an afterthought by the OP), but for that > the discussion should be centered on what those APIs will look like, not > the syntax one uses to call them. > > In fact, quite frequently, syntax discussions make more important design > decisions be ignored (see namespaces). > > There is, in my opinion, *one* merit here -- redesigning -- and perhaps >>> reimplementing -- the arrays functions API. This will require a lot of >>> work, >>> thought, and time tough. >>> >> >> Yes, but long due, same for strings. >> > > -- > Gustavo Lopes > --0016e6d77ce39e809404c5040ad1--