Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60001 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 229 invoked from network); 16 Apr 2012 13:33:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 13:33:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:35301] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/F5-05733-BAF1C8F4 for ; Mon, 16 Apr 2012 09:33:32 -0400 Received: by ggmb2 with SMTP id b2so2718716ggm.29 for ; Mon, 16 Apr 2012 06:33:28 -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 :content-type:content-transfer-encoding:x-gm-message-state; bh=j/9KLHGS/mTI3QHmE2cey3gIGAuUrWBZf/CMptMGpgs=; b=ICcTFqMsV2icQMbnHFtZV/PrWKldne8so2CtzhUS+rKQFBAck6H8Tdl1Iv8aCAytVf PQrqb+juR8e+QbOBGU9psW+Nj56XF83KylrlnLC3mM8KubY2V+w5zASAHxFTOj/c8FUv wCZxj+AgrUi/qMzsMQLkYrFfYxJ6PPUBY+ca93ZdxhpxbYqB5f+v6aFsRcI2BvU/b8Tf aKm748jV3NJ+SN6kMqsaAnfTDoVgF8sb5rFXS1lPYIOnC7L2ozKvIGNyWAW4hjyOPyNH 3wfMQiwH8nGgwOJsuVqvuldWjNeKZY749xbT8YFs/iFLHUNAo+JQZ93X+rg8IqofANDt uZNA== MIME-Version: 1.0 Received: by 10.236.193.101 with SMTP id j65mr11023636yhn.47.1334583208000; Mon, 16 Apr 2012 06:33:28 -0700 (PDT) Received: by 10.101.57.14 with HTTP; Mon, 16 Apr 2012 06:33:27 -0700 (PDT) In-Reply-To: References: <4F876943.8030105@gmail.com> <4F877777.8050806@gmail.com> <4F8782CC.8030205@gmail.com> <4F87C9B0.4080809@gmail.com> <4F8AA9CF.6000003@gmail.com> <4CF91067-DBC4-4CD7-AF91-1814A6999EEF@punkave.com> Date: Mon, 16 Apr 2012 09:33:27 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkvr8v58ecVopYsJ45v1yI4FweHFrqyS/Zb67CJpr+ThilGIS8g+b6o76HcP1bZEA3dSYgU Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: tom@punkave.com (Tom Boutell) Oh I see. Yes, this is one of the reasons I don't like the "pure can't include non-pure" idea. Another reason: you can't write generic algorithms. PHP 5.4 has much improved support for anonymous functions, so we should see an increase in libraries that take a few functions as parameters and carry out an operation via those functions. But what if one of those functions requires something from a .php file? Whoops, I guess it's not a generic sorting algorithm library I just released, it's a "generic sorting as long as none of your functions touch a .php file" algorithm library. And good luck figuring this out when it happens. Kris has pointed out that you could still load a .php file via a function that was defined earlier in a .php file that later includes .phpp. But this just means that, like my RFC, his RFC contains a compromise about strictness. It's just that his compromise is more confusing and less likely to be understood before the user gets frustrated and declares the whole thing not worth messing with. I think ".phpp files don't contain but can require and include files that do" is a much clearer compromise, one that will get us what we want (an ever increasing percentage of .phpp files) without making enemies and generating opposition along the way to that better place. On Mon, Apr 16, 2012 at 9:24 AM, Arvids Godjuks wrote: > 16 =C1=D0=D2=C5=CC=D1 2012=9A=C7. 16:09 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC= =D8 Tom Boutell =CE=C1=D0=C9=D3=C1=CC: > >> These tools already strip > support rolling in a .phpp file unmodified. Unless I am missing somethin= g? >> >> Sent from my iPhone >> >> On Apr 15, 2012, at 5:30 PM, Arvids Godjuks >> wrote: >> >> > I posted the bellow text in other thread, but i should have it post >> > here, >> > so i'm reposting it to this thread. >> > >> > Well, it's time for me to remind about the techique many use (and some >> > frameworks provide it out of the box) - the application file >> > concatination >> > to speed up file loading. >> > Yii framework provides a Yiilite.php file for this, that includes most= ly >> > used core classes in one big file.that loads much faster and is used f= or >> > production. Any other framework has user extentions or other type of >> > solutions for this to speed up the application, and it makes really bi= g >> > difference. >> > So there is a good question - how the hell in a MVC framework would i >> > combine my models, controllers, components and other stuff that will >> > definetly be as in .php so in .pphp. And not every file will be cached >> > like >> > that - some will remain as distinct files even in production. >> > >> > The further discussion goes the more questions there is and less answe= rs >> > there are. > > > Yes they obviously do, but that's not what I'm concerned about. > What I'm concerned is that code from .php and .pphp files get's mixed in > together - template engine related stuff is used as much, as do controlle= rs, > session handling classes and bunch of other stuff that by definition is > .pphp stuff, but the template stuff is .php and it includes templates. So > basically everything just has to fall back to the embedded PHP mode to wo= rk > and we have no gain from the proposal what so ever - it just becomes > useless. > > That's not counting other issues that people and I have been voicing and = to > be honest, I never saw a reply to any of it. Maybe there is a reply to > all=9Athose=9Aquestions, but they are under wall of text that usually goe= s in > reply - that just discourages to read it at all. --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com