Re: [PHP-DEV] forbid use declaration outside of a namespace in PHP 7

2014-11-12 Thread Adam Harvey
On 11 November 2014 04:11, Robert Stoll wrote: >> I always found it very ugly that it is possible to define a use outside of a >> namespace. Consider the following: >> >> namespace{ //default namespace >> } >> >> use foo\Bar; >> >> namespace test{ >> new Bar(); //error, test\Bar not found } >>

Re: [PHP-DEV] forbid use declaration outside of a namespace in PHP 7

2014-11-11 Thread Stas Malyshev
Hi! > I don’t like the sound of changing the spec before the implementation. I agree - whatever are our considerations and limitations on what we can and can not do in PHP 7, the spec should reflect what is there. Otherwise we end up releasing an implementation that does not match our own spec, t

Re: [PHP-DEV] forbid use declaration outside of a namespace in PHP 7

2014-11-11 Thread Andrea Faulds
> On 11 Nov 2014, at 13:20, Robert Stoll wrote: > >> I would say that the lack of anyone saying "no, don't do this" probably >> means everyone is OK with it. Suggest you work up a >> patch and PR it, then ping the list to highlight it for further discussion. >> > > Sounds reasonable but unfor

Re: [PHP-DEV] forbid use declaration outside of a namespace in PHP 7

2014-11-11 Thread Chris Wright
On 11 November 2014 12:11, Robert Stoll wrote: > > -Ursprüngliche Nachricht- > > Von: Robert Stoll [mailto:p...@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 > > > > Heya, >