Re: Various small patches (Zend, TSRM...)
| From: | Zeev Suraski | Date: | Tue, 05 Dec 2000 12:57:23 +0000 |
| Subject: | Re: Various small patches (Zend, TSRM...) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40126@lists.php.net to get a copy of this message | ||
At 14:39 5/12/2000, Sascha Schumann wrote:
why is there a need to differentiate anyway?The Right Way of doing things would have probably been changing this bogus definition, instead of forcing everyone to add in 'void's. () should mean that the function accepts no arguments (i.e., it should be forbidden to neglect the argument list. But anyway, this is really discussion is really getting a bit carried away. I don't like these (void)'s, you do, end of story :) Zeev -- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/You can easily recognize that, if you look at C++. In C++, "foo();" means the function takes no parameters. In C, it means the function takes any number of arguments.That allows you to write code like this:int foo();main() { int a; double b;foo(a); foo(b); foo(); }At least for me, automatic type checking helps programmers to write bug-free code. The "foo();" notation prevents that.