Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59517 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27347 invoked from network); 9 Apr 2012 17:11:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 17:11:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=luke@cywh.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=luke@cywh.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cywh.com from 209.85.212.42 cause and error) X-PHP-List-Original-Sender: luke@cywh.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:55736] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/A2-14133-228138F4 for ; Mon, 09 Apr 2012 13:10:59 -0400 Received: by vbjk13 with SMTP id k13so2817755vbj.29 for ; Mon, 09 Apr 2012 10:10:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=references:from:in-reply-to:mime-version:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=nPBLZKfMNOhvVPYDaWVjiv85QA05HyZV4bwlLLHWz1Q=; b=E6pTWSJLlEZOHmdMmm4G2OwjOcOrgJ6L2TqnekiRtWrCxkcgNHJ6zffKvAN3cgAycd Yd4NcbWZxDfu79fm6jOihVu03gvGIFFAIzl1arKlshRHJoh4UBZyHAGWc0xmWm8+WI0s AiOdhVvTpf7d665nUDz0tiO979z2kwxeuV6+MeqsKFuCP6o1ny0yFdWJ15TAMIe2hhyY pTwgHZAJpk4k3h8svZp7NCseYULw6VpppM0ji0pSazYt3pbpb6iuMZ10zKQDH/LyvtGy uH2ABHIRVfWKowBplgNnkXIxzjP8aUaFZoMJbwWWjq3MPX2tPfWXeAgdFHOR3wkdVA1f hbzg== Received: by 10.52.69.100 with SMTP id d4mr3436147vdu.9.1333991456234; Mon, 09 Apr 2012 10:10:56 -0700 (PDT) References: <-5877502932356715576@unknownmsgid> In-Reply-To: Mime-Version: 1.0 (1.0) Date: Mon, 9 Apr 2012 10:10:55 -0700 Message-ID: <-3647345967307864634@unknownmsgid> To: Tom Boutell Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmd0DZUGVX51TvXd/OXRABZIe3GsJqE1kenF+0s/7FLdkQw10NqfyMX5VrRXepZcXozhDd1 Subject: Re: [PHP-DEV] RFC: source files without opening tag From: luke@cywh.com (Luke Scott) On Apr 9, 2012, at 9:16 AM, Tom Boutell wrote: > It sounds like you are proposing to gradually kill the use of PHP for > templating entirely, which I don't think is something people would > vote for. I'm not saying that at all. I'm saying that PHP code should be clearly separated from template code. (since PHP 5 due to how easy it is for white space to end up on the tail end of a file). this is even the case with procedural code. Half the PHP frameworks out there have their own template engine because they can do a lot more than what short tags offer. Example: Twig offers template inheritance. Introducing a keyword for PHP code without the and text before the opening I sometimes use perfectly good older frameworks that do use > .php files for templating in a reasonable way, and I'm one of the > advocates for migrating away from starting everything with would have to vote against it myself. And those files can be included with something like require_template or you can turn off the option in the ini file. The point is in EITHER MODE a php file that starts with . > There's no reason to kill good > code that passes its tests just because it uses inline HTML. I won't > even know I have that code in my project from some third party library > until I find out the hard way. No, just no. (: I'm not trying to kill anything. In fact what I'm proposing would be a smooth transition to something that is already done. The difference is at some point you won't be able to do this: Print me! I did propose one new keyword, but by proposing one keyword with a > future-friendly syntax instead of four new keywords I'm attempting to > help with the pollution problem. It's not as much as adding a keyword as it is what keyword you're adding. I hope the way I've explained things makes sense. Luke > > On Mon, Apr 9, 2012 at 11:43 AM, Luke Scott wrote: >> Tom, >> >> As I've said before I don't think new keywords are the answer. They >> will just pollute the language even further. >> >> I also don't think an ini setting is a bad thing either. It is often >> used in PHP as a way to transition from way of doing things to >> another. First you introduce it with it being off by default, then on >> by default, then deprecate the old behavior. It's quite normal in >> PHP's history. >> >> In another email someone mentioned doing two rfcs. In both cases are >> we talking about removing > confusing to keep track of what is being talked about. If that is the >> case, continue reading. >> >> I would prefer the starting > Just explicitly forbid the ending ?> tag and treat text before the >> opening > or throw an error. >> >> That is at least how I would prefer the "code" mode as most >> non-template files only start with > compatibility. >> >> If you must add keywords it should be something like require_template >> NOT require_code/require_file. Templates are the exception, not the >> norm. >> >> Luke Scott >> >> On Apr 8, 2012, at 9:32 AM, Tom Boutell wrote: >> >>> I have written an RFC proposing backwards-compatible support for >>> source files without an opening >> >>> https://wiki.php.net/rfc/source_files_without_opening_tag >>> >>> This RFC is not yet listed at https://wiki.php.net/rfc. I am not sure >>> what the requirements are to get it added to the "Under Discussion" >>> session and get the ball rolling formally. Please enlighten and I'll >>> do whatever is required. >>> >>> Thanks! >>> >>> -- >>> Tom Boutell >>> P'unk Avenue >>> 215 755 1330 >>> punkave.com >>> window.punkave.com >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> > > > > -- > Tom Boutell > P'unk Avenue > 215 755 1330 > punkave.com > window.punkave.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >