Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58396 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93809 invoked from network); 1 Mar 2012 09:00:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2012 09:00:27 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:36989] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/AD-46815-E8A3F4F4 for ; Thu, 01 Mar 2012 04:00:00 -0500 Received: by yenl5 with SMTP id l5so113820yen.29 for ; Thu, 01 Mar 2012 00:59:55 -0800 (PST) Received-SPF: pass (google.com: domain of pierre.php@gmail.com designates 10.236.72.230 as permitted sender) client-ip=10.236.72.230; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pierre.php@gmail.com designates 10.236.72.230 as permitted sender) smtp.mail=pierre.php@gmail.com; dkim=pass header.i=pierre.php@gmail.com Received: from mr.google.com ([10.236.72.230]) by 10.236.72.230 with SMTP id t66mr5540289yhd.45.1330592395413 (num_hops = 1); Thu, 01 Mar 2012 00:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=k/YDTNb5bLMTdg5WZ6Tl94M/a4XGW+4dKGviFrg/ZHA=; b=iktafr4MutmsZlPwCX70KfzStie7x5Z2ef22BWHhqGRQnFqqF24xq7Ebn94Zy9ygW4 G9q2+E2RiJGe5wkJMuJZvSF9BCr81AbQx1R/l1GZg5JdeidbWjVCfP2eIuSziY9gCBSB QHM7kKJhET1f842Y6T53DbQYOwnJvOAf2hkHQ= MIME-Version: 1.0 Received: by 10.236.72.230 with SMTP id t66mr4292006yhd.45.1330592394848; Thu, 01 Mar 2012 00:59:54 -0800 (PST) Received: by 10.146.221.14 with HTTP; Thu, 1 Mar 2012 00:59:54 -0800 (PST) In-Reply-To: References: <693e15008681dfe7372eaea66214f8a8.squirrel@www.l-i-e.com> <4F4D5D44.5090307@developersdesk.com> Date: Thu, 1 Mar 2012 09:59:54 +0100 Message-ID: To: Richard Lynch Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting) From: pierre.php@gmail.com (Pierre Joye) If any of you are interested in such change in PHP, please get together and write a complete RFC. As I do not see any kind of progress but, as you stated, some philosophical discussions. That's all good but after 2 weeks, it is time to move forward (or stop). Cheers, On Thu, Mar 1, 2012 at 4:02 AM, Richard Lynch wrote: > On Wed, February 29, 2012 7:16 pm, John Crenshaw wrote: >> I'm beginning to think that the type hinting question is too closely >> related to the dirty secrets of type juggling to resolve them >> separately. You may have to either discard consistency, or else fix >> the problem of silent bizarre conversions at the same time ('foo'=3D=3D0= , >> '123abc'=3D123). Fixing the conversions is a BC break though. > > [short version] > One man's "fixing" is another man's "feature" :-) > > Old hands can now hit delete while I wax philosophical. > > [long version] > > PHP does the type juggling because HTTP data is all string. It's a > feature, because PHP's main purpose was to process HTTP input. > [Yes, I know you did not dispute this. It's just foreshadowing...] > > Once one accepts the premise that automatic type-juggling is "good", > the idea that (int) "123 abc" turns into 123 may seem incredibly > "wrong" or "right" depending on how useful one has found it. > > I have found it useful, and others have as well, to the point that we > don't consider it something to "fix" but a "feature" > > Obviously, others disagree. =A0And that's okay. We "get" that some > disagree, and even why some disagree. We've all coded in C, C++, C#, > Forth, Modula 2, Lisp, PL/1, and many more, collectively. > > We choose PHP, at times, because it is the way it is, as "broken" as > it may seem to others. And they are legion. One only needs to review > blogs and mailing lists of fans of other strictly-typed languages to > see this. > > But Breaking Compatibility with something so deeply ingrained in the > culture and language, which goes back consistently at least to PHP3, > and probably PHP/FI, is a non-starter. > > There are probably literally millions of scripts that will break "out > there." That's simply unacceptable, and I trust you understand why > that is so. > > You might consider those scripts poor programming practice. We all do. > But PHP is the language of the unwashed masses, and that was, and is, > part of why it is hugely popular. Somebody who barely understands > programming can pound away at the keyboard and write a bloody useful > web application, breaking 10,000 Computer Science rules along the way. > > It's duct tape and bailing wire. And we love it for that. > > If the app is useful enough, it might even get cleaned up. =A0Or just > more duct tape and bailing wire is applied, more likely. :-) > > Even at a major release, PHP has, by and large, strived to remain > Backwards Compatible, unless a VERY compelling reason was presented. > > A vocal minority, or even a majority, of developers does not qualify. > That's pretty much why the Core Devs' "veto" power exists. > > Some of the proposals and ideas lately have adhered to that concept of > not breaking Backwards Compatibility. Others have not, and those are > just non-starters. > > But PHP core has always had the mantra "Keep It Simple, Stupid" > > If one wants a complex language, PHP is simply not going to be it, and > virtually all of these proposals do not fit the KISS principle, at a > fundamental level of "Any idiot can read halfway decent code and > puzzle out what it does in less than a day." > > This is a Religious Issue, a personal preference, a philosophical > ideal, etc. Right or wrong, it is what it is, by choice, by the core > developers who have put years worth of effort into it. > > Please don't read this as "go away" or a restatement of the arguments > that have been labeled as circular before. =A0I am merely trying to > explain why PHP is the way it is, at a 10,000 foot level, and why so > many core devs are resistant to the changes being proposed. > > I highly respect all the efforts and the alternative philosophical > differences, and even the guiding principles of Computer Science > driving them. PHP is just not the language for Computer Science types, > for the most part. It's for the masses. > > Some CS types like it in certain situations, which is all to the good, > or it would be a total mess :-) We embrace its "flaws" and ugly hacks > because, like it or not, "it works" for what it's designed to do. > > -- > brain cancer update: > http://richardlynch.blogspot.com/search/label/brain%20tumor > Donate: > https://www.paypal.com/cgi-bin/webscr?cmd=3D_s-xclick&hosted_button_id=3D= FS9NLTNEEKWBE > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org