Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42353 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42005 invoked from network); 19 Dec 2008 15:51:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2008 15:51:56 -0000 Authentication-Results: pb1.pair.com header.from=ionut.g.stan@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ionut.g.stan@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.21 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ionut.g.stan@gmail.com X-Host-Fingerprint: 209.85.218.21 mail-bw0-f21.google.com Received: from [209.85.218.21] ([209.85.218.21:39249] helo=mail-bw0-f21.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/CA-09584-A13CB494 for ; Fri, 19 Dec 2008 10:51:55 -0500 Received: by bwz14 with SMTP id 14so3047041bwz.23 for ; Fri, 19 Dec 2008 07:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ano63WjB36SDHWYlrOychz7UAaEcePJZEYhIa2UvUpY=; b=RB77pG2TJt5uJyVFHVzA28LFP1Gi6TrzOJKHrQUE7R+L4g3Awj0J6U7Rp9oUeNt4KB DkJwwxMGv+JJONmZgvAJ7Xnx19941aLY9HjF/+bLTTnbCJ8nJfbkclCsRiKItSAC9GT/ 23xFC6Xvi96nWW87VVYCCYIRw6/x/uDcYdwfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=IW07qWPdSRJ6d8shW/OOYvxhCZh8O8KbYQHbCP3DPurn+X6XZezD/4pDogZKN4il4n OSADilt6XnOgje4IPWqwiZbhy9nowOTyCezumPEjvLyxxOJUYjH/aIAzDgLItSgxdvBD Aiilj2kNCZeWoi5GmButsChCweit+yG/pcQXM= Received: by 10.103.1.5 with SMTP id d5mr1284597mui.29.1229701911998; Fri, 19 Dec 2008 07:51:51 -0800 (PST) Received: from ?10.0.0.187? (mail.cmbtravel.ro [84.234.105.22]) by mx.google.com with ESMTPS id 12sm4423371muq.54.2008.12.19.07.51.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Dec 2008 07:51:51 -0800 (PST) Message-ID: <494BC2AE.3060606@gmail.com> Date: Fri, 19 Dec 2008 17:50:06 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20081204 Thunderbird/3.0b1 MIME-Version: 1.0 To: viroteck@viroteck.net CC: PHP Developers Mailing List References: <69.22.48223.7E389494@pb1.pair.com> <494ACEAE.2090700@gmail.com> <494AD2AF.9000702@gmail.com> <2dedb8a0812181823q53a3b464oc1e2e2bd37792f98@mail.gmail.com> <494BB04C.40603@gmail.com> <98b8086f0812190640l6a2dd6bcm179031e36a50a122@mail.gmail.com> <98b8086f0812190718x1783be2dy869d1b2240f0a72@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Q on Primitives From: ionut.g.stan@gmail.com (Ionut Gabriel Stan) On 12/19/2008 17:39, Robin Burchell wrote: > Ugh. Apparantly I forgot to CC the list on those last two mails.. > Sorry. Pasted so others stay in on the conversation: > > On Fri, Dec 19, 2008 at 3:18 PM, troels knak-nielsen wrote: >> > That's an interesting mail, expresses a viewpoint I hadn't considered, > so, thanks for that. > > However: If PHP provides such a set in stone opinion on how things > should be done, then why does it support, for example, provide class > vs functional programming paradigms - both to a first degree level? > (the mysqli extension is a very good example of what I mean here). > > As I have seen it, PHP is one of the best of all tools: it provides > the features that many different programmers wish to use, and allows > them to use it. It doesn't restrict itself to any single spectrum of > programming, and I think that robustness is one reason it has > flourished, and continues to do so well into the future. > > I see this as just another logical extension of that philosophy: you > see this as being "not the PHP way", whilst I see it as the polar > opposite: enabling programmers to do things as they wish, which I have > always thought was very much the PHP way :) > > > ------------ > > > > On Fri, Dec 19, 2008 at 3:09 PM, Nathan Rixham wrote: >> because all of those current declarations would no longer work on the new >> version of php which implemented such change..? and I'm assuming it would be >> a much bigger change to the php internals than adding in an optional type >> after the method params..? > > They would continue to work, because (you seem to be missing this > point of what I am suggesting) - 'function' would just mean a return > of a variant type (i.e. the current behaviour of not caring what it > is, and not touching it in any way > > Whether or not it is a large change I am not qualified to suggest; I > haven't yet done too extensive a digging into the internals. > Actually functional programming [1] is a different beast than what you are referring to, which is called procedural programming [2]. In that regard, a database interface like mysqli is hardly functional. Sorry if I've hijacked the discussion somehow. [1] http://en.wikipedia.org/wiki/Functional_programming [2] http://en.wikipedia.org/wiki/Procedural_programming