On 10/23/07, Gregory Beaver <[EMAIL PROTECTED]> wrote: > > <?php > > namespace (Foo::Bar); > > import(new new); > > > parse error - of all reserved words, only "namespace" and "import" are > allowed as class names in my patch Sorry missed that. Somehow I thought this applies only to functions. Anyway allowing some keywords as class/function names and other not adds some inconsistency to the language IMHO.
> > // etc. > > ?> > > Looks kinda odd to me although it might have sense in some context. > > > > Anyway my main question was: is there any reason not to use keyword "use"? > The only reason for me is that "use" implies some kind of autoloading, > as I suggested in one of my other mails. This gets into parsing > semantics, something I'm not interested in doing. I guess it's the matter of background. To me "import" implies autoloading where "use" doesn't. > If the folks go with > "use" that is fine, but for me personally not the best solution, which > is why I put hours into making this patch. > > However, no matter what I definitely would like to see code written for > PHP 5.2 and earlier that uses "import" or "namespace" as class names or > functions continue to work in PHP 5.3. "namespace" is used commonly for > XML information (for obvious reasons), and import is a very common idea, > as already stated. I appreciate work but as I said above I think it adds inconsistency and I think its not very good idea. I deffinetely agree that code written for PHP 5.2 should continue to work in PHP 5.3. However this patch is only one of possible solutions and it's up to you guys which way to go. Just a thought: maybe we should be discussing namespace/name_space/something instead of import/use :-) Just my 2 cents. Giedrius -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php