Re: Raising errors inside a constructor
| From: | Olivier Guilyardi | Date: | Tue, 17 Aug 2004 14:45:14 +0000 |
| Subject: | Re: Raising errors inside a constructor | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32747@lists.php.net to get a copy of this message | ||
Joshua Eichorn wrote:
Olivier Guilyardi wrote: Joshua Eichorn wrote: Generally using base classes is a bad idea (well in php, something like java is a bit different), especially to get rid of static calls which are very readable just a little different if you've never seen them before.I see that you answered my question : with php5 interfaces we can do real OO. I'm personally not really concerned by the "overhead" you're talking about, since I work on intranets, and if it gets slow, it usually is a matter of adding a hard disk to a striping RAID. But this is a personal issue... -- ogI've seen and used static calls. As less as possible though, since that does not follow the OO paradigm. Java ? Humm... The new features of php5 really remind me of Java (or some other real OO language). Is your above statement still true with php5 ?php5 might have OO features but there is still quite a bit of overhead in parsing to large object trees. Plus even in java the base class limits your flexability a lot, especially when intergrating classes from other sources. I don't think I would sacrifice flexibility for OO purity but if your going that route at least make the error handling stuff an interface that the base class implements otherwise you end up having to hack 3rd party code instead of just extending it to make it fit. -josh