Re: kick-off

From: Date: Mon, 28 Feb 2000 18:20:39 +0000
Subject: Re: kick-off
References: 1 2  Groups: php.pear 
Request: Send a blank email to php-pear+get-31@lists.php.net to get a copy of this message
chagenbu@wso.williams.edu wrote: > > Quoting "Stig S. Bakken" <ssb@fast.no>: > > > Should PEAR contain classes and extensions only, or functions too? By > > using the Class::method() syntax, functions can be made part of a class > > but still be available directly, so I lean towards using only classes. > > I agree that using classes is cleaner namespace-wise. The only thing that it > sort of prevents is writing packages that are backwards compatible to php3. I > guess that's a policy decision - do we want to really push people to upgrade to > 4? If so, then make Pear 4-only and accumulate as many classes into it as > possible. If not, then maybe some consideration should be made for having > function packages as well. Backward compatibility with PHP 3 is out of the question. There are too many nice OO features in PHP 4 that should be exploited. > Also, here's a consideration: Can you pass a method name to usort() yet? If not, > we'll have to allow at least sorting functions... This particular problem will arise for a whole bunch of built-in functions. One way to deal with it could be to make all these function interpret arrays as "method pointers": $obj = new MyClass; $mptr = array(&$obj, "myMethod"); usort($arr, &$mptr); - Stig

« previous php.pear (#31) next »