<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: PHP 6 Namespaces</title>
	<atom:link href="http://www.nullislove.com/2007/07/06/php-6-namespaces/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nullislove.com/2007/07/06/php-6-namespaces/</link>
	<description>Code for Coders</description>
	<pubDate>Sat, 31 Jul 2010 03:43:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: donquixote</title>
		<link>http://www.nullislove.com/2007/07/06/php-6-namespaces/comment-page-1/#comment-2310</link>
		<dc:creator>donquixote</dc:creator>
		<pubDate>Sun, 04 Oct 2009 04:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/07/06/php-6-namespaces/#comment-2310</guid>
		<description>what about "dynamic" namespaces, where the namespace identifier is defined outside of the file?

------------- foo.php ----------------

function foo() {}

------------- bar.php ----------------

function bar() {}

------------- index.php --------------

// static namespace syntax
MyNamespace::include('foo.php');
MyNamespace::include('bar.php');
MyNamespace::foo();
MyNamespace::bar();

// dynamic namespace syntax
$my_namespace-&gt;include('foo.php');
$my_namespace-&gt;include('bar.php');
$my_namespace-&gt;foo();
$my_namespace-&gt;bar();

// alternative syntax
include 'foo.php' in $my_namespace;

// directory includes
recursive_include($wordpress_namespace, 'lib/wordpress');
recursive_include($mediawiki_namespace, 'lib/mediawiki');

--------------------------------------

The syntax has some problems, but the idea is clear:
Responsibility for nameclashes is moved to the user code. Existing code can be namespaced from outside.

Why am I writing this here?
Because I did not find another place..</description>
		<content:encoded><![CDATA[<p>what about &#8220;dynamic&#8221; namespaces, where the namespace identifier is defined outside of the file?</p>
<p>&#8212;&#8212;&#8212;&#8212;- foo.php &#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>function foo() {}</p>
<p>&#8212;&#8212;&#8212;&#8212;- bar.php &#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>function bar() {}</p>
<p>&#8212;&#8212;&#8212;&#8212;- index.php &#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>// static namespace syntax<br />
MyNamespace::include(&#8217;foo.php&#8217;);<br />
MyNamespace::include(&#8217;bar.php&#8217;);<br />
MyNamespace::foo();<br />
MyNamespace::bar();</p>
<p>// dynamic namespace syntax<br />
$my_namespace-&gt;include(&#8217;foo.php&#8217;);<br />
$my_namespace-&gt;include(&#8217;bar.php&#8217;);<br />
$my_namespace-&gt;foo();<br />
$my_namespace-&gt;bar();</p>
<p>// alternative syntax<br />
include &#8216;foo.php&#8217; in $my_namespace;</p>
<p>// directory includes<br />
recursive_include($wordpress_namespace, &#8216;lib/wordpress&#8217;);<br />
recursive_include($mediawiki_namespace, &#8216;lib/mediawiki&#8217;);</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>The syntax has some problems, but the idea is clear:<br />
Responsibility for nameclashes is moved to the user code. Existing code can be namespaced from outside.</p>
<p>Why am I writing this here?<br />
Because I did not find another place..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Null is Love &#187; Blog Archive &#187; Namespaces Come to PHP</title>
		<link>http://www.nullislove.com/2007/07/06/php-6-namespaces/comment-page-1/#comment-476</link>
		<dc:creator>Null is Love &#187; Blog Archive &#187; Namespaces Come to PHP</dc:creator>
		<pubDate>Mon, 20 Aug 2007 16:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/07/06/php-6-namespaces/#comment-476</guid>
		<description>[...] in July, I wrote that the PHP internals team was discussing implementing namespaces in PHP [...]</description>
		<content:encoded><![CDATA[<p>[...] in July, I wrote that the PHP internals team was discussing implementing namespaces in PHP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Skoglund</title>
		<link>http://www.nullislove.com/2007/07/06/php-6-namespaces/comment-page-1/#comment-475</link>
		<dc:creator>Kevin Skoglund</dc:creator>
		<pubDate>Mon, 20 Aug 2007 15:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/07/06/php-6-namespaces/#comment-475</guid>
		<description>Definitely another candidate to consider.  I'm in support of any syntax that includes curly-braces to limit the start and end of the namespace.

The one downside to your idea is that it requires rewriting "class" and I'm sure that's a bigger project than they were hoping to take on to get namespaces implemented.

Right now, Dmitry Stogov's patch is still the leading one, but it's not without controversy.</description>
		<content:encoded><![CDATA[<p>Definitely another candidate to consider.  I&#8217;m in support of any syntax that includes curly-braces to limit the start and end of the namespace.</p>
<p>The one downside to your idea is that it requires rewriting &#8220;class&#8221; and I&#8217;m sure that&#8217;s a bigger project than they were hoping to take on to get namespaces implemented.</p>
<p>Right now, Dmitry Stogov&#8217;s patch is still the leading one, but it&#8217;s not without controversy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amaury Bouchard</title>
		<link>http://www.nullislove.com/2007/07/06/php-6-namespaces/comment-page-1/#comment-473</link>
		<dc:creator>Amaury Bouchard</dc:creator>
		<pubDate>Sat, 18 Aug 2007 19:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/07/06/php-6-namespaces/#comment-473</guid>
		<description>Why not another possibility?

For example something like :
class AA::BB::CC {
}
class AA::BB::DD {
}
class AA::EE::CC {
}

$c1 = new AA::BB::CC();
$c2 = new AA::EE::CC();


Pretty simple, no ?

It could work even for non-OOP:
function AA::BB::func($param) {
}
const ZZ::YY::C = "foo";

AA::BB::func(ZZ::YY::C);</description>
		<content:encoded><![CDATA[<p>Why not another possibility?</p>
<p>For example something like :<br />
class AA::BB::CC {<br />
}<br />
class AA::BB::DD {<br />
}<br />
class AA::EE::CC {<br />
}</p>
<p>$c1 = new AA::BB::CC();<br />
$c2 = new AA::EE::CC();</p>
<p>Pretty simple, no ?</p>
<p>It could work even for non-OOP:<br />
function AA::BB::func($param) {<br />
}<br />
const ZZ::YY::C = &#8220;foo&#8221;;</p>
<p>AA::BB::func(ZZ::YY::C);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
