Hi Stefan,

Putting multiple namespaces in one file is really unusual case.
It may be implemented, but I don't like to do it, because it may give more
mess then advantage.

Probably you'll have to create separate file for each namespace to make your
idea work.
BTW byte-code doesn't depend on namespaces and files to much so with
modified APC you can cache multiple files at once.
You can also use something like PHAR that is made especially for deployment.

Thanks. Dmitry.



> -----Original Message-----
> From: Stefan Priebsch [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, July 07, 2007 2:45 PM
> To: Dmitry Stogov
> Cc: 'David Coallier'; 'Stefan Walk'; 'Brian Moon'; 
> internals@lists.php.net
> Subject: Re: [PHP-DEV] Simple Namespace Proposal
> 
> 
> Hi Dmitry,
> 
> Allowing only one namespace per file is a clean concept which 
> I like very much. I have a use case for putting multiple 
> namespaces into one file, though.
> 
> OOP-PHP applications are usually one class per file with 
> conditional loading. This does not play well with caching. I 
> am working on gluing together all files of a project into one 
> large source file on deployment (a phing task will do this) 
> so it can be opcode cached as one large application binary. I 
> will then compare the performance of both apporaches, but I 
> have a feeling that the "single binary" approach will be 
> faster. As APC will be part of PHP6, I think this approach 
> could improve general performance of PHP applications and 
> easw deployment.
> 
> Allowing only one namespace per file will obviously kill this 
> approach. So if there is there a chance of allowing a 
> namespace in braces, it would be great if you could make this 
> possible.
> 
> Kind regards,
> 
> Stefan
> 
> -- 
>  >e-novative> - We make IT work for you.
> 
>  e-novative GmbH - HR: Amtsgericht München HRB 139407
>  Sitz: Wolfratshausen - GF: Dipl. Inform. Stefan Priebsch
> 
>  http://www.e-novative.de
> 

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to