Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62547 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94742 invoked from network); 27 Aug 2012 01:39:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Aug 2012 01:39:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=gwynne@darkrainfall.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=gwynne@darkrainfall.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain darkrainfall.org designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: gwynne@darkrainfall.org X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:39835] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/D2-13425-FDFCA305 for ; Sun, 26 Aug 2012 21:39:44 -0400 Received: by iamm10 with SMTP id m10so8681036iam.29 for ; Sun, 26 Aug 2012 18:39:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=wSuk2faA1dKJC1N8LqHnmafL+CjyA6WGVj5UlKXTubs=; b=TYIQTlwRjpUd69OzxJgUo5Az9MP5Tm7E0K/H91MVKclIBC0tkxqRd9ohFUbaAZigqb Uah1maXATMiSSXJQUsTaPTvbQm1a0Ow6AJsixxMBHYOVg7iTJnxBUPAaI41bLNYlVK2+ mZNfVqEKfvhrCz+fKklM0iwqTB0eKkrVEirh/26A/o2xE+nX+Mz5611cCI8xQI2OuT6p KAh6AIp6RYkXnDBA60CeV4GT2BTQtrmn5jxMqIe/YBSOvW6HlE0s88/mv811eAELOK05 qduC9hVqGG/P3ILiGXSqaEn7ZmUhBI50l6/sX5E2D8ZSaCPFzlHARseVn2zsBgE/CWfj ZXKw== Received: by 10.50.236.72 with SMTP id us8mr8498879igc.70.1346031579873; Sun, 26 Aug 2012 18:39:39 -0700 (PDT) Received: from mail-iy0-f170.google.com (mail-iy0-f170.google.com [209.85.210.170]) by mx.google.com with ESMTPS id 10sm17849164igf.11.2012.08.26.18.39.38 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Aug 2012 18:39:38 -0700 (PDT) Received: by iamm10 with SMTP id m10so8680998iam.29 for ; Sun, 26 Aug 2012 18:39:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.214.1 with SMTP id nw1mr8580738igc.2.1346031578104; Sun, 26 Aug 2012 18:39:38 -0700 (PDT) Received: by 10.42.69.131 with HTTP; Sun, 26 Aug 2012 18:39:38 -0700 (PDT) In-Reply-To: <503ACBDD.3080304@lerdorf.com> References: <503A68F9.9050405@sugarcrm.com> <503A84F3.4080808@sugarcrm.com> <503ACBDD.3080304@lerdorf.com> Date: Sun, 26 Aug 2012 21:39:38 -0400 Message-ID: To: Rasmus Lerdorf Cc: Kris Craig , Stas Malyshev , Gustavo Lopes , Andrew Faulds , Yahav Gindi Bar , Laruence , PHP Internals Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnM7HTSsFLYLtJd07Zp+HpznFQBVKfsw5v6AojXz9IJ1FD/fiSPRbj6I5qZoje1qzp0Y4Nu Subject: Re: [PHP-DEV] Re: [VOTE]Call for voting: support use list in foreach From: gwynne@darkrainfall.org (Gwynne Raskind) On Sun, Aug 26, 2012 at 9:22 PM, Rasmus Lerdorf wrote: > On 08/26/2012 06:18 PM, Kris Craig wrote: >> Short of killing ourselves rewriting it in C++, I'm not sure there >> is an ideal solution to this problem. > > Because you think more people can grok C++ than C? That's not my > experience. C is essentially a subset of C++. Any strong C++ developer > (I think I have only ever met 2 of those) will know C inside out. > > -Rasmus That's where it gets ugly, in my experience; there are lots of mediocre C++ developers (and legions of even expert PHP/JavaScript/Python/Ruby/etc. devs) who couldn't so much as use a pointer without around to check their NULLs and do their deletes for them. LLVM is written in C++, and all that's done is raise the barrier of entry. C++ enables countless idioms that haven't made it into as high-level a language as PHP itself because of the potential for massive abuse (unchecked operator overloads, for one example). Basically, I expect that going to C++ would do nothing but encourage less talented people to do much more of the work, and the result would be a hopeless tangle (what we have now is a tangle, but at least it's not hopeless). My intention isn't to turn this into a language flame war, of course, but if you want to talk about rewriting PHP itself in a language that doesn't require all the dancing around that C does (with zval, for example), C++ is hardly the answer unless it's possible to enforce coding guidelines even more strictly than has already been done. (And a side note on that, the requirement of C89 standard compliance in PHP has less and less advantage these days, and handicaps those few language features in the later flavors of C (C99, gnu99, Clang C, etc.) which -could- lessen the current unreadability of the code.) -- Gwynne