Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59534 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62005 invoked from network); 9 Apr 2012 19:27:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 19:27:17 -0000 Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:45145] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/06-34074-418338F4 for ; Mon, 09 Apr 2012 15:27:16 -0400 Received: by wibhr14 with SMTP id hr14so2335973wib.11 for ; Mon, 09 Apr 2012 12:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=uYOr6T/4hZtCClDoJ8tvNaLqojUJwEQh99nAZmUnP3I=; b=S7pyIe9BZUFIFxGR6yW1pcm7XN6iwA2OzRxid1aKh/y4rjh3l/wu042SZQjOCEEAzX 5iPhOfghL6+81L4igrFIwUZz2U6HBMrqyvhS6ya9eeI2a7ulUQyqKRN16zyl9/nNw9S2 5A70XWafenQ0x/vsnU/Ft6rcgPOAYGJ3EvUGsPLhaS8MY0OcJvgY0UWwzT/XouZUC0y2 Ofe7jKJl1j+wedY9uD92d/szrrus9uDJM3IQuXAfQ2UKkEqL8NCaw8j2F+Y9oZ2T4rgQ oIMYG93iu/ro4rCmhbgG5SJpDvcL3PkrNsmRvmCy0/hbF4CYVN8RMQSeS1wM5uWriSKW 4Cuw== Received: by 10.180.82.136 with SMTP id i8mr409650wiy.19.1333999633472; Mon, 09 Apr 2012 12:27:13 -0700 (PDT) Received: from [192.168.1.26] (123.Red-193-153-87.dynamicIP.rima-tde.net. [193.153.87.123]) by mx.google.com with ESMTPS id h8sm52355353wix.4.2012.04.09.12.27.11 (version=SSLv3 cipher=OTHER); Mon, 09 Apr 2012 12:27:12 -0700 (PDT) Message-ID: <4F83394B.90602@gmail.com> Date: Mon, 09 Apr 2012 21:32:27 +0200 User-Agent: Thunderbird MIME-Version: 1.0 To: Luke Scott CC: Tom Boutell , PHP Internals References: <-5877502932356715576@unknownmsgid> <-3647345967307864634@unknownmsgid> <-1399915171627175127@unknownmsgid> In-Reply-To: <-1399915171627175127@unknownmsgid> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: source files without opening tag From: keisial@gmail.com (=?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?=) On 09/04/12 19:36, Luke Scott wrote: > On Apr 9, 2012, at 10:23 AM, Tom Boutell wrote: >> Also, your objection - that 'require_code' is confusing - would most >> likely be an issue for a handful of people who write autoloaders. >> Those clean PHP class files are almost always autoloaded. > Not really. Has nothing to do with auto loaders. > > require_code - A literal string? Is this eval? > > require_path - A directory? > > require_file - What kind of file? A php file, of course :) > You have to look at the keywords you're proposing and try to explain > then without prior knowledge or documentation. But if you come accross them you'd see something like: require_code "setup.php"; Which is much more clear. > These keywords are also ambiguous. require/include are well understood > for including code not templates. Not just for PHP. PHP has allowed to require HTML forever. Given it's php developers the main target, it is not a huge argument that they may get confused by require_file doing what require has always done. I admit require_code for a full HTML file* may be slightly odd, but require_file is completely aseptic about that. * Which should instead have been loaded with readfile()... > require_template on the other hand is clear and to the point. It's > hard to make the same kind of assumptions as you can with the other > keywords. And with those who know PHP it's readily apparent > require_template could mean short tags whereas the other leave you > scratching your head. Except that you're breaking compatibility by designing it the opposite way. It may have been the perfect idea if we were designing PHP from scratch, but we're not. This is a 17 years old language.