Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78869 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37750 invoked from network); 11 Nov 2014 12:11:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2014 12:11:35 -0000 Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:42279] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/42-17159-4FCF1645 for ; Tue, 11 Nov 2014 07:11:34 -0500 Received: (qmail 8573 invoked from network); 11 Nov 2014 13:11:29 +0100 Received: from cm56-129-238.liwest.at (HELO RoLaptop) (86.56.129.238) by ns73.kreativmedia.ch with ESMTPSA (AES128-SHA encrypted, authenticated); 11 Nov 2014 13:11:29 +0100 To: "'PHP Internals'" References: <000201cff3b2$37615e50$a6241af0$@tutteli.ch> In-Reply-To: <000201cff3b2$37615e50$a6241af0$@tutteli.ch> Date: Tue, 11 Nov 2014 13:11:27 +0100 Message-ID: <001101cffda8$9f56e980$de04bc80$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIPPXtbPZBTwayAd3/waoyNKhChzJvc1gvA Content-Language: de-ch Subject: AW: [PHP-DEV] forbid use declaration outside of a namespace in PHP 7 From: php@tutteli.ch ("Robert Stoll") > -----Urspr=FCngliche Nachricht----- > Von: Robert Stoll [mailto:php@tutteli.ch] > Gesendet: Mittwoch, 29. Oktober 2014 20:55 > An: 'PHP Internals' > Betreff: [PHP-DEV] forbid use declaration outside of a namespace in = PHP 7 >=20 > Heya, >=20 > I always found it very ugly that it is possible to define a use = outside of a namespace. Consider the following: >=20 > namespace{ //default namespace > } >=20 > use foo\Bar; >=20 > namespace test{ > new Bar(); //error, test\Bar not found } >=20 > After some thoughts it is quite clear that Bar is test\Bar and not = foo\Bar inside of the namespace test. But consider the > following example which is not so obvious: >=20 > use foo\Bar; > namespace test; > new Bar(); //error, test\Bar not found >=20 > The use declaration looks like a normal use declaration at first = glance. > I do not see why we should actually support this "feature" any longer = and thus suggest to remove it in PHP 7. Although, it is > not a bug (the use declaration is simply ignored as far as I can tell) = I suppose it confuses the user. > Nevertheless, even if we declare it as a "feature" I think it should = at least not be a "feature" of the specification of PHP 7. >=20 > Thoughts? >=20 > Cheers, > Robert >=20 >=20 > ps: I first started the discussion @standards, just if you should = wonder why it pops up here now as well: > http://news.php.net/php.standards/528 >=20 >=20 >=20 > -- > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, = visit: http://www.php.net/unsub.php No one else who thinks this "feature" should be removed in PHP 7 ?