Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30979 invoked from network); 16 Sep 2008 08:44:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2008 08:44:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=kenashkov@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kenashkov@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.171 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kenashkov@gmail.com X-Host-Fingerprint: 209.85.200.171 wf-out-1314.google.com Received: from [209.85.200.171] ([209.85.200.171:53034] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/46-30574-7D17FC84 for ; Tue, 16 Sep 2008 04:44:08 -0400 Received: by wf-out-1314.google.com with SMTP id 26so2407535wfd.26 for ; Tue, 16 Sep 2008 01:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=PajdaN8BXu1pu31FIM0uGKBdmUDN+bmZIwqV725BVXU=; b=lYwCcYS47ui/EYIOhtaCo4Y9i0NQomjnS1xOqYRqUxEerJWkx9cMIseXaCaJvM74a3 PsmIzIHTaYWHx5hG+r+X4IAtV5qxePc/pMh5qC5PTsxFI/JGBUsXN+T6PWFG2mLpy4oA CpaBGeD8FApmTlGpBPeRmX3Ofqs5emwvYetcc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=t17kpAD4lfjp5jzfTLk8WpgwNaIAyiAP+VyXnl/evl/b7/7og5Ce2HtWaY4YXyFaKv Gkirm6BIEgsWARkElPZMD1/uXVrIJdxDAkPw0greooWfi6lyPVwDP/FdVhGDKA4GCuSc MCv2xONgO99ZsPYAiJkWYHNuz2DqWilgX2fm4= Received: by 10.142.215.5 with SMTP id n5mr264533wfg.27.1221554645142; Tue, 16 Sep 2008 01:44:05 -0700 (PDT) Received: by 10.142.76.6 with HTTP; Tue, 16 Sep 2008 01:44:05 -0700 (PDT) Message-ID: <261daaa10809160144y3e2d6641y9b23632ac03f2495@mail.gmail.com> Date: Tue, 16 Sep 2008 11:44:05 +0300 To: "Jochem Maas" Cc: "Karsten Dambekalns" , internals@lists.php.net In-Reply-To: <48CEEB4D.2050505@iamjochem.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_166462_24717234.1221554645138" References: <66DC865A-1910-46E4-AEB5-37BE62D2417A@typo3.org> <261daaa10809151520s6c3f5adfld10004d8c408f301@mail.gmail.com> <48CEEB4D.2050505@iamjochem.com> Subject: Re: [PHP-DEV] Reply on "Who is using namespaces in PHP already?" From: kenashkov@gmail.com ("Vesselin Kenashkov") ------=_Part_166462_24717234.1221554645138 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline We had no issues related to the namespaces (well we found & reported some minor bugs, but not related to the namespaces). Of course we have one namespace per file, having the file structure following the namespace structure. As well, as Karsten mentions, converting some_class_name_new to some::class::name::new is not an option. We had no issues with the name resolution and no confusion so far on how to use the namespaces. In fact, we have a complex autoload procedure that follows the directory/namespace hierarchy to load/create (yes we generate some) classes. No issues with the autoload so far. Just one note: you should not throw Exceptions during the all autoload process, not just the __autoload function. I haven't checked the releases in the last month so this might have changed. Besides the namespaces, our internal framework uses in it fundamentals the Late Static Binding (for creating singletons and providing the static method get_instance ). In overall I can say that php 5.3 is highly anticipated (both because of the namespaces and LSB). I'm reading the ongoing discussions and proposals for support for multiple namespaces per file but this I think will delay 5.3. My opinion is that php 5.3. has to be finally released even with limited support for namespaces. It can be followed immediately with another release with the extended namespace support (this way many users will switch to namespace support although some CMS/frameworks will not because for optimization reasons they combine files). 5.3 was delayed enough already... Vesselin Kenashkov On Tue, Sep 16, 2008 at 2:10 AM, Jochem Maas wrote: > Vesselin Kenashkov schreef: > >> Hi, >> >> At our company the majority of the projects in the last 4 months are using >> namespaces (we can afford using dev version of php, because we host the >> projects). >> Just to add my +1 into the count. >> > > care to elaborate? what are your experiences? have you run into any > trouble? > have you developed a list of do's and dont's? (as Karsten has) > > > >> Vesselin Kenashkov >> >> On Mon, Sep 15, 2008 at 5:26 PM, Karsten Dambekalns > >wrote: >> >> Hi. >>> >>> Lukas asked on his Blog, so here goes my answer. >>> >>> We switched to namespaces last week for FLOW3 and all related packages. >>> See >>> http://forge.typo3.org/repositories/revision/21/1210 for the needed >>> changes and >>> http://forge.typo3.org/wiki/flow3-overview/Notes_on_using_PHP_namespacesfor >>> some notes on the implications. >>> >>> Currently we don't have any problems with use statements, as we still >>> have >>> fully qualified names almost everywhere, thus autoloading works as >>> expected. >>> >>> Still, looking into the future I'd love to see an enhancement as proposed >>> by Greg in http://marc.info/?l=php-internals&m=121527668606247 plus some >>> way to get rid of having to use single classes if I could use some >>> wildcard >>> instead. >>> >>> Regards, >>> Karsten >>> -- >>> Karsten Dambekalns >>> Gimme Five! >>> http://typo3.org/gimmefive >>> >>> >>> >>> >> > ------=_Part_166462_24717234.1221554645138--