Re: Re: namespaces?
| From: | Tomas V.V.Cox | Date: | Sun, 15 Jul 2001 12:07:41 +0000 |
| Subject: | Re: Re: namespaces? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-770@lists.php.net to get a copy of this message | ||
Andi Gutmans wrote:
>
> Guys,
>
> So does anyone have any ideas what you feel needs to be done in this area
> in order to accommodate pear?
> I'd be very interested in proposals which can fit in the current PHP
> language model. Don't forget to take into account conditional include()'s.
>
> Andi
>
Just some strange thoughs:
- Automatic includes. For example, if I do: $foo = new Bar, it could
search in the registered classes stack, find the file and do
"require_once" of it automaticly.
- It could be cool to have a native tree object PHP data structure in
the way that dom-xml does.
- The ability to call a parent method without loosing the object, so
instead of parent::method() do for ex: parent->method().
- Return in constructors. For me seems a little bit silly the need off
providing an extra method to do the work and get the error back.
$foo = new bar();
$err = $foo->build(); //or something similar
if (PEAR::isError($error)) { .. }
while you could simply do:
$foo = new bar(); // or perhaps something like $foo = new::bar();
if (PEAR::isError($foo)) { .. }
Tomas V.V.Cox