Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64869 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66027 invoked from network); 11 Jan 2013 21:46:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2013 21:46:59 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 67.200.53.250 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 67.200.53.250 mail.zerocue.com Received: from [67.200.53.250] ([67.200.53.250:34069] helo=mail.zerocue.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/B0-59997-15880F05 for ; Fri, 11 Jan 2013 16:46:58 -0500 Received: from [172.17.0.122] (unknown [66.25.151.173]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.zerocue.com (Postfix) with ESMTPSA id 1017012037A; Fri, 11 Jan 2013 21:46:54 +0000 (UTC) Message-ID: <50F08844.7070605@zerocue.com> Date: Fri, 11 Jan 2013 15:46:44 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Stas Malyshev CC: PHP internals References: <50EF2634.9030008@sugarcrm.com> <50EF8FCF.7020701@zerocue.com> <50F03079.3030801@zerocue.com> <50F0654E.6050305@sugarcrm.com> In-Reply-To: <50F0654E.6050305@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] A remark about PHP's Vision and new things. From: cpriest@zerocue.com (Clint Priest) On 1/11/2013 1:17 PM, Stas Malyshev wrote: > Hi! > >> A function that is related to a zend_function struct could be placed >> anywhere, in any file and can be named in any way. Finding it is like >> looking for a needle in a haystack, then you add macros. > You can do macros in C++ too, and you can have detached functions too. > And it is perfectly possible to make mess with classes, I have seen it > many times. Thinking that the language would somehow make you write good > code is an illusion. It can help you or fail to help you, but it can > never make you. C has tools to help you, though some of them aren't as > powerful as I would wish for, it still has them. > >> When I first started with working with the php-core I was doing >> everything wrong because it's a big mess, that's what happens with C, it > It has nothing to do with C. Thinking that if PHP core was written in > you would instantly get what's going on > after 3 minutes looking in the code is, again, an illusion. PHP core is > complex, because it does complex things. It also somewhat messy as any > organic growth project becomes after 15 years. Nothing has anything to > do with the language. You don't need C++ to not put new zend_hash > functions into zend_compile.c. You just need common sense and knowledge > how the project works. That's true, but you can't put a method on a ZendHash class without defining it within the class definition. I forget that C++ does let you actually implement that function outside of the class definition, but it's not a method of the class if it's not in the class definition. I've gotten too use to the way PHP does it where all of the code for the class is within the class definition it's-self, not quite the same as C++. Can we re-write PHP with PHP? ;) -- -Clint