Hi Sebastiann et al., On Sun, 2007-09-30 at 18:06 +0200, Sebastian Bergmann wrote: > When we removed the namespace implementation that was scheduled for > PHP 5.0 before PHP 5.0's release we kept the T_NAMESPACE and T_USE > tokens for forward-compatibility.
T_NAMESPACE is new, only T_USE wasn't removed back then. afaik. ;-) > The new namespace implementation in HEAD and PHP_5_3 uses the the new > T_IMPORT token instead of T_USE thus breaking code as "import" is now > a reserved word. > > We should, IMHO, drop T_IMPORT and change the namespace implementation > to use T_USE. > > Thoughts? Well, import seems to be a word used quite often in PHP for method names, after I found some code breaking I did a short test using Google's Codesearch[1] to look for method calls using "->import(" and got "about 300" results including major apps like horde, tikiwiki, typo3 and wordpress. Therefor I think it's worth to at least think about using the already reserved, but not used, keyword "use". From taking a look at the language (the English one in this case ;-)) a sentence like "use Namespace::SomeClass as SomeClass" makes perfect sense to me - but I don't know much about the concept of Perl's (and other language's) meaning of "use", BUT, we're neither Java nor Perl but PHP so we should use the keyword fitting best to PHP... If we can agree on the change I can write a patch changing the token and renaming the internal stuff accordingly. johannes [1] http://www.google.com/codesearch?q=lang%3Aphp+%22-%3Eimport%28% 22&hl=en&btnG=Search+Code -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php