Re: [PHP-DEV] Interfaces in PHP

2002-08-21 Thread Ben Dischinger
Thanks for all of your guys' comments on this. Ultimately I see Zeev's insight of PHP not having a strong type definition totally accurate. Even if we did have a mechanism to make sure that a class defined certain functions, we could not readily see if these functions did what we wanted, bri

Re: [PHP-DEV] Interfaces in PHP

2002-08-21 Thread Brad LaFountain
--- Tim Converse <[EMAIL PROTECTED]> wrote: > > --- Brad LaFountain <[EMAIL PROTECTED]> wrote: > > > 2) Interfaces as they exist in java don't really give you > > much in a stripting > > language but if you insist on having something like that > > you can curently do it > > with the zend1. > >

Re: [PHP-DEV] Interfaces in PHP

2002-08-21 Thread Alan Knowles
Wez Furlong wrote: >class C { > delegatee $foo = new IFoo(); // "implements" IFoo by delegation > delegatee $bar = new IBar(); // "implements" IBar by delegation >} > I didnt see anyone suggest this as an alternative to the delegatee syntax, - it just a bit clearer to read (to me anyway..) c

Re: [PHP-DEV] Interfaces in PHP

2002-08-21 Thread Wez Furlong
Did you guys re-read the discussion in the ZE2 archives as I suggested? In brief: class IFoo { function foo() {} } class IBar { function bar() {} } class C { delegatee $foo = new IFoo(); // "implements" IFoo by delegation delegatee $bar = new IBar(); // "implements" IBar by delegati

Re: [PHP-DEV] Interfaces in PHP

2002-08-21 Thread Zeev Suraski
At 09:30 21/08/2002, Ben Dischinger wrote: >You don't quite get the same functionality from extending a class as you >would from implementing an interface. If I'm extending temperature what >keeps me as a user from not overriding any of those functions? Or what if I >want to extend a different cl

Re: [PHP-DEV] Interfaces in PHP

2002-08-20 Thread Ben Dischinger
> 2) Interfaces as they exist in java don't really give you much in a stripting > language but if you insist on having something like that you can curently do it > with the zend1. > > class temperature { > function __construct($value) {} > function toCelcius() {} > function toFar

Re: [PHP-DEV] Interfaces in PHP

2002-08-20 Thread Tim Converse
--- Brad LaFountain <[EMAIL PROTECTED]> wrote: > 2) Interfaces as they exist in java don't really give you > much in a stripting > language but if you insist on having something like that > you can curently do it > with the zend1. > > class temperature { > function __construct($value) {}

Re: [PHP-DEV] Interfaces in PHP

2002-08-20 Thread Ben Dischinger
To: "Alan Knowles" <[EMAIL PROTECTED]>; "Wez Furlong" <[EMAIL PROTECTED]> Cc: "Ben Dischinger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, August 21, 2002 1:05 AM Subject: Re: [PHP-DEV] Interfaces in PHP > > --- Alan Knowles <

Re: [PHP-DEV] Interfaces in PHP

2002-08-20 Thread Brad LaFountain
--- Alan Knowles <[EMAIL PROTECTED]> wrote: > From my reading of delegation, it's really overloading, worded slightly > differently.. - but not that related to interfaces... > > In the example below, which is a php'ized version of a C# demo, the > advantages of using interfaces (as far as I k

Re: [PHP-DEV] Interfaces in PHP

2002-08-20 Thread Alan Knowles
From my reading of delegation, it's really overloading, worded slightly differently.. - but not that related to interfaces... In the example below, which is a php'ized version of a C# demo, the advantages of using interfaces (as far as I know) are primarly useful for COM or CORBA, where it wo

Re: [PHP-DEV] Interfaces in PHP

2002-08-20 Thread Wez Furlong
Hi Ben, ZE2 will implement something that can used much like interfaces; Please see this RFC on Delegation; something very similar to the syntax described there will be in PHP 5. http://cvs.php.net/co.php/ZendEngine2/RFCs/004.txt?r=1.2 Also, review the archives for [EMAIL PROTECTED] list for mo

[PHP-DEV] Interfaces in PHP

2002-08-20 Thread Ben Dischinger
What are the thoughts on implementing interfaces (as in object) within PHP? Does the work outweigh the benefits? Ben Dischinger -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php