Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48291 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5908 invoked from network); 14 May 2010 12:53:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2010 12:53:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 ns.km36107.keymachine.de Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:59528] helo=schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/9C-44964-6E74DEB4 for ; Fri, 14 May 2010 08:53:59 -0400 Received: from localhost (ka.local [127.0.0.1]) by schlueters.de (Postfix) with SMTP id 566B824C1D for ; Fri, 14 May 2010 14:53:56 +0200 (CEST) Received: from [192.168.1.31] (ppp-93-104-52-247.dynamic.mnet-online.de [93.104.52.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by schlueters.de (Postfix) with ESMTPSA id 0EA0F24C1B; Fri, 14 May 2010 14:53:55 +0200 (CEST) To: Mathias Grimm Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 14 May 2010 14:53:54 +0200 Message-ID: <1273841634.4175.9.camel@guybrush> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Sugest From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Thu, 2010-05-13 at 20:38 -0300, Mathias Grimm wrote: > I want to suggest the GO include format > > require > ( > 'utila.php', > 'utilb.php', > 'utilc.php', > ) > > the same from include What's te benefit, other than saving a few chars on the cost of being more explicit. I don't see any benefit. Doing this would mean an error to include one of these files would give an imprecise error message. Given fails it will always tell you about an error in line 5 (basically where the ; is) will give you the precise line. Other similar issues exist. > or more , without comma > > > require > ( > 'utila.php' > 'utilb.php' > 'utilc.php' > ) that looks more like a typo than expected code. > or more, withou .php > > require > ( > 'utila', > 'utilb', > 'utilc', > ) that makes no sense. It would have to check for two files, and why only .php? Why not .inc or .class or whatever people are using? > > the same for other to, like define.. > > define > ( > 'K_TYPE_A' => 'a', > 'K_TYPE_B' => 'b' > 'K_TYPE_C' => 'c' > ) > > with or without comma... define() is a regular function so we'd have to make it a language construct (which creates issues) or do some strange things to function declarations. Again, I see no benefit (and no, a few characters more are no trouble, writing code is never the hard part. The hard part is maintenance ... and a proper IDE serves quite well for saving key strokes ...) johannes