Re: Re: Clarifying the resolution rules
| From: | Josh | Date: | Tue, 28 Oct 2008 12:35:07 +0000 |
| Subject: | Re: Re: Clarifying the resolution rules | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41506@lists.php.net to get a copy of this message | ||
We are going to ignore the inherit problems that calling
file_get_contents(__FILE__); would cause...
Also, I disagree with a PHP namespace. the looseness of the language
is one of its strong points. Some things should be made strict, I
agree, bit it start with a php namespace and where does it end? If
your not careful you end up with c# or java where doing anything
requires going through hundreds of classes and packages.
Josh
On Tue, Oct 28, 2008 at 10:09 PM, Nathan Rixham <nathan@kraya.co.uk> wrote:
> Stan Vassilev | FM wrote:
>>
>> Opinions about how disruptive a mandatory backslash for global symbols *in
>> namespaces* would be, are welcome. Keep in mind that making the backslash
>> optional will lead to code breakage (such as for above drop-in replacements,
>> class autoloading etc.) and slower performance (runtime resolution of
>> function calls).
>
> personally not very disruptive, and after a few hours I think it would
> become second nature.
>
> I'm sure there will be a few comments about this, but.. why not move all
> internal functions and classes to a php namespace so that everything has to
> be in a namespace by default - ie no code that isn't in a namespace.
>
> ie
> php\file_get_contents(__FILE__);
> instead of
> \file_get_contents(__FILE__);
>
> major major change but nice and strict
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>