Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76309 invoked from network); 16 Jun 2008 22:22:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2008 22:22:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:41387] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/2F-06776-BA7E6584 for ; Mon, 16 Jun 2008 18:22:36 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 17 Jun 2008 01:22:41 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Jun 2008 15:22:15 -0700 Message-ID: <4856E78D.6020100@zend.com> Date: Mon, 16 Jun 2008 15:22:05 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Chris Stockton CC: internals@lists.php.net References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> <48077BD2.2000107@zend.com> <48078168.1070801@zend.com> <496536410.20080525103752@marcus-boerger.de> <483929DC.2060606@zend.com> <4856D4EF.4000002@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jun 2008 22:22:15.0095 (UTC) FILETIME=[6E1B4470:01C8CFFF] Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: stas@zend.com (Stanislav Malyshev) Hi! > I get this, really, I do, again. Like the previous post I (likely we) > understand. Unfortunately, it looks like you do not. Probably my failure to explain it clearly. > Did you not get or read my post? You say again and again 1 == '1', but > you are forgetting those OTHER operators, === and !==. 1 !== '1' does > it? ====>Add numeric hinting like I said 50 posts ago and your 1 == '1' I do not talk about the bits in the engine and how all the operators work. I talk about how the user thinks (or should think) about using PHP. Yes, === exists for a reason. But, in most cases == is what you really want, that's why it got to be ==. > the API level. People who want to make it strictly integer, will Again, people who want to make it strictly integer are wrong in 90% of the cases. Because of that, giving them more tools to be wrong in 90% of the cases is... well, wrong :) Other 10% are possible, but they do not belong to the language syntax. > continue to do so as they do now. You can not, and should not want to, > control the way people program. When you design the language, that's what you do, to some measure. You program differently in C, Prolog, LISP, Javascript or PHP. At least, you should - otherwise you are working against the grain of the language and only make yourself work harder then necessary. Of course, you want to give people more tools - but some tools just don't belong there. That's why C[++] has operator* and PHP does not. > But I know this will never happen because no one cares what users > want... your logic of You seem to confuse "what users want" with "what I want". I don't get all I want from PHP too, and sometimes I think it's wrong. But I also know it is not possible for PHP to satisfy 100% of feature requests from everybody - and even if it were, it would make PHP worse, not better. PHP is in constant process of improvement, so claiming "no one cares what users want" is just contrary to the facts. > How in the world, does this remotely, possibly, even slightly make sense? It doesn't, because you wrote it so on purpose, to misrepresent my position. The position is simple. PHP has certain set of ideas behind it, and certain way of doing things. Having strict hints in function definitions promotes entirely different way of doing things, which fits compiled languages much better and dynamic language like PHP much worse. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com