Re: Q on Primitives
| From: | Ionut Gabriel Stan | Date: | Fri, 19 Dec 2008 15:50:06 +0000 |
| Subject: | Re: Q on Primitives | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42353@lists.php.net to get a copy of this message | ||
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<troelskn@gmail.com> wrote: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<snip>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<nrixham@gmail.com> 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.