Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84367 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24732 invoked from network); 5 Mar 2015 23:22:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2015 23:22:59 -0000 Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.172 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.214.172 mail-ob0-f172.google.com Received: from [209.85.214.172] ([209.85.214.172:35592] helo=mail-ob0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/3F-40418-255E8F45 for ; Thu, 05 Mar 2015 18:22:59 -0500 Received: by obbgq1 with SMTP id gq1so17407103obb.2 for ; Thu, 05 Mar 2015 15:22:56 -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=A23zHt3rbgNJArarXxn+reClGOt4XqgL6nOvzK5ZhXA=; b=jGuiufuHkNHg7kbrBnzPbMv1QLjWAVvO26eST7Bkd8SRZPDv+EBUjR2V2ijeYT7oCI 1IWmDx6vqigHwMOAltg62orAYSWyagiDady1hheMYe5pk8IYuxqs+7EENXWF86zkx+rY 3an36+mfInK4SDz+qubExm8yYaWoktOxk6//3bD9mjR7KBLBIEWBObBlvRatBK3PDpUf pVYgyBmvbu3SuBvSSSRtcYe0c+PjCfuBuQi+Th8dq1s+DXD8o4gN5lpyd64Qofq8ByuO Iwm3iDSvSGLuTyc7JO/QYl5NuxsMIux4MFute9EgLfTG8lN5jdUZoCjCiaRP/8ZYV9Om 8s5g== X-Received: by 10.182.40.195 with SMTP id z3mr8949856obk.38.1425597775973; Thu, 05 Mar 2015 15:22:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.14.39 with HTTP; Thu, 5 Mar 2015 15:22:35 -0800 (PST) In-Reply-To: References: <54F4E93C.80206@gmail.com> <54F4EBEC.2090702@garfieldtech.com> <54F4F3FC.6060501@fischer.name> <54F4FDFB.8010701@lsces.co.uk> <54F5895D.3090002@gmail.com> <554F0C3F-770F-4694-A5AB-FDC54FCCBF00@gmail.com> <1FCB68B8-3E55-4B5D-B805-9D92D848A3A1@gmail.com> <5D8591E2-5AE6-4B4C-AAE0-3D15523410AC@gmail.com> <54F83C4D.1020206@gmail.com> Date: Fri, 6 Mar 2015 01:22:35 +0200 Message-ID: To: Yasuo Ohgaki Cc: Pierre Joye , Rowan Collins , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c21e3207b32c051092d921 Subject: Re: [PHP-DEV] Consistent function names From: arvids.godjuks@gmail.com (Arvids Godjuks) --001a11c21e3207b32c051092d921 Content-Type: text/plain; charset=UTF-8 2015-03-05 22:20 GMT+02:00 Yasuo Ohgaki : > Hi Arvids, > > On Thu, Mar 5, 2015 at 9:32 PM, Arvids Godjuks > wrote: > >> 2015-03-05 13:49 GMT+02:00 Pierre Joye : >> > >> > >> > I will say it again a last time, in my opinion only a clean API; >> > object-like or real object as long as performance is not affected is >> > the only way I could see to actually solve this problem. >> > >> > Changing the names, argument order (pointless once we will have named >> > arguments, btw) and similar solutions are band aids solutions, >> > confusing at best, terrible at worst. It is pointless to do it after >> > almost two decades for some of them. >> > >> > -- >> > Pierre >> > >> > I'm with Pierre here. >> Adding aliases is gonna mess up things even more. For example - >> autocomplete will become hard to navigate. It's already quite lengthy list >> a lot of the times and it's easier just to write the whole function name >> sometimes by hand. Adding aliases will make it worse. >> > > I agree. Therefore, I'm going to update manual also so that it recommends > main function, not aliases. Aliases should be alternative. > > Manual and IDE don't have to list all of them. New manual lists only main > functions, does not have dedicated pages for aliases but aliases are > mentioned > in main function page as aliases. > > >> >> We really need a new API, that is not crossing paths with the old. That >> way >> people can start building stuff on new API's and we could phase out the >> old >> mess, for example: depricate in PHP8, remove in PHP9. >> Stop-gap measures have created enough problems already, or did everyone >> suddenly got an amnesia and forgot all the past lessons on the list? > > > PHP should be multi paradigm language, not pure OO language. > IMO. Python does good job. > > "Python is a multi-paradigm programming language: object-oriented > programming > and structured programming are fully supported, and there are a number of > language features which support functional programming and aspect-oriented > programming" > http://en.wikipedia.org/wiki/Python_%28programming_language%29 > > It sounds like there are people who would like to discard procedural APIs. > PHP has born as procedural language. It will not happen in short term at > least. We are far from having rich and good enough OO APIs sets to make > PHP a pure OO languages. > > This leads to conclusion that we need to maintain/improve procedural APIs > even if we are going to make PHP a pure OO language. > > I finally understand why some of us against this change and suggest OO APIs > as alternative. It's reasonable making procedural APIs a > legacy/unmaintained/ > messed up to discard procedural APIs someday. I'm against it. PHP should > be like Python in this regard. IMO. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > Why not take advantage of namespaces and do the new API, building it up version by version (sure it can't be done in one go), so probably the extensions gonna follow too. That allows you to use as OO interface, so do the functions. Well, yes, it will be under a namespace, but at least new projects can be started that way. And old code will be easy enough to port, it's mostly a question of refactoring tools. Aliasing is a stop-gap measure, isn't it? API's tend to get redesigned and PHP's is due to a major makeover. So, why not embrace it? No one's forcing to retire the old one any time soo, and I belive people understand it will be a very long time before it is phased out, if ever (well, I think in like 20 years probably is doable). And if done right, it may be done in a way that if you don't need it, you can leave out the old API on compile stage - not sure if doable thought. Arvids. --001a11c21e3207b32c051092d921--