----- Original Message ----- From: "Stanislav Malyshev" <[EMAIL PROTECTED]> To: "Brian Moon" <[EMAIL PROTECTED]> Cc: "PHP Development" <[EMAIL PROTECTED]> Sent: Thursday, October 18, 2001 10:53 AM Subject: Re: [PHP-DEV] New zend_compile.c to solve all of the duplicate function problems
> BM>> And my fix will keep a function from being defined twice. It > BM>> will simply also allow people who have become accustomed to > BM>> using the language this way to keep doing it. > > I'm not sure that being allowed to use a language in a buggy way is a > right thing to do... This would hide many "double include" errors, and > would *not* restore the backwards compatibility - since code that didn't > work then would work now with your patch. > I don't think that's true. From what I can tell, if a different function in a different location in the same file or another file is encountered by the compiler, his patch with produce a fatal error. This fixes the problem where people were attempting to actually redefine a function name. Brian's patch allows the compiler to encounter the same function in the same file on the same line and only give a notice instead of a fatal error. It's not the most elegant solution, but then again, we have no #ifdef and #ifndef as you C coders do to allow us to properly create function libraries. If/else could be used to achieve similar results, but from what I understand, only under a serious performance penalty. Which, BTW, is very unacceptable. Daniel -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]