Re: Suggestions: Built-in classes for PHP5

From: Date: Sun, 06 Apr 2003 14:19:43 +0000
Subject: Re: Suggestions: Built-in classes for PHP5
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-745@lists.php.net to get a copy of this message
At 16:08 06.04.2003, Timm Friebe wrote:
On Sun, 2003-04-06 at 15:52, Marcus Börger wrote: At 15:09 06.04.2003, Timm Friebe wrote:
Hello, as you might know, the Zend Engine 2 features a built-in Exception class. The problem with a class named Exception is that no user-defined class named Exception may exist.
That is the sense of built in classes. Actually, I'd say the sense of built-in classes is the same as built-in functions: They're likely to be faster, they have some possibilities userland doesn't have and are a convenient to have.
Exactly
[...] It is just the other way round. Put your used defined "exceptin" in a namespace. Well, this is a unnecessary constraint on users, though. I know this is possible, I just don't see any reason on why the Zend Engine should have its built-in classes in the global namespace. Do you?
Yes, the default should be the default. And in this case it means when you don't have your own namspace specific crap the engine defaults to the builtin exception. And another one: Why should we make all users type some lines of code not needed (import class exception etc. pp)? marcus

« previous php.internals (#745) next »