Re: [PHP4BETA] cvs: /php4 fopen-wrappers.c
| From: | Zeev Suraski | Date: | Fri, 31 Mar 2000 00:05:25 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4 fopen-wrappers.c | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12930@lists.php.net to get a copy of this message | ||
I think we should aim to write code the Right Way, and not necessarily the
way that is most transparent to the developers (because this transparency
may bite them). Virtual tranparency is no replacement for good
documentation, and we'll get to documenting the entire Zend&PHP API's
quite soon.
I think we can get by with both approaches, but I do lean towards special
macros.
Zeev
On Fri, 31 Mar 2000, Sascha Schumann wrote:
> On Thu, Mar 30, 2000 at 06:32:09PM -0500, rubys@us.ibm.com wrote:
> >
> >
> > > If you look at our CODING_STANDARDS, you will notice that they are
> > completely
> > > outdated. What I fear is that new extension authors will join the PHP
> > community
> > > without having any decent documentation. How shall they know that they
> > must use
> > > PHP_CHDIR and friends in their code? In the future, there will be
> > separate
> > > extensions distributed from various places which are not under our
> > control.
> > > I think redefining chdir etc. to their virtual counterparts would
> > proactively
> > > prevent broken code, and thus leveraging code quality.
> >
> > Speaking as a relatively new member of the PHP development community...the
> > CODING_STANDARDS tell very little about what you need to know to write a
> > PHP extension. There are a large number of macros that must be mastered.
> > INTERNAL_FUNCTION_PARAMETERS, SLS_FETCH, DL_LOAD, just to name a few.
> >
> > I must say that I prefer what Andi has done. If I were to spend a few days
> > tracking down a bug that turned out to be because the call I coded didn't
> > do what I expected, I would be pretty steamed.
>
> It is the other way around. The author will be pretty steamed when he finds
> out that his use of chdir does not work as expected, because it does not
> cooperate with our virtual stuff.
>
> Yes, the learning curve is pretty steep right now. I think it is the wrong
> direction to make it even more harder for new contributors by adding
> unnecessary macros.
>
> - Sascha
>
>
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/