Re: [PHP-DEV] make new return a reference to existent object

2005-05-11 Thread Duncan McIntyre
Wez, I have similar problems. I think your suggested solution is the wrong approach because your problem is not creating objects, it is destroying them. My solution would be to define a new magic static method __free() which is given an instance of the class every time a reference to that insta

[PHP-DEV] Re: [mail] Re: [PHP-DEV] Re: Attributes support proposal

2005-04-28 Thread Duncan McIntyre
On Wednesday 27 April 2005 10:16 pm, Andi Gutmans wrote: > At 03:28 PM 4/27/2005 +0300, Zeev Suraski wrote: > >At 20:12 25/04/2005, Christian Schneider wrote: > >>[snip] > >>But then again I think the whole thing is typical OO bloat anyway and > >>that's why I don't want to have language features a

Re: [PHP-DEV] Re: [mail] Re: [PHP-DEV] Re: Attributes support proposal

2005-04-27 Thread Duncan McIntyre
On Wednesday 27 April 2005 2:19 pm, Zeev Suraski wrote: > At 16:58 27/04/2005, Duncan McIntyre wrote: > >I remember similar arguments being made about most of the new OO features > >in PHP5. > > > >Out of interest, how is this more bloated than storing doc comments in &

Re: [PHP-DEV] Re: [mail] Re: [PHP-DEV] Re: Attributes support proposal

2005-04-27 Thread Duncan McIntyre
On Wednesday 27 April 2005 2:19 pm, Zeev Suraski wrote: > At 16:58 27/04/2005, Duncan McIntyre wrote: > >I remember similar arguments being made about most of the new OO features > >in PHP5. > > > >Out of interest, how is this more bloated than storing doc comments in &

[PHP-DEV] Re: [mail] Re: [PHP-DEV] Re: Attributes support proposal

2005-04-27 Thread Duncan McIntyre
On Wednesday 27 April 2005 1:28 pm, Zeev Suraski wrote: > At 20:12 25/04/2005, Christian Schneider wrote: > >[snip] > >But then again I think the whole thing is typical OO bloat anyway and > >that's why I don't want to have language features added for it (-:C > > I wholeheartedly agree. > > Zeev I

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_API.c zend_API.h zend_compile.c zend_compile.h zend_reflection_api.c

2005-04-26 Thread Duncan McIntyre
On Tuesday 26 April 2005 11:47 am, Derick Rethans wrote: > On Tue, 26 Apr 2005, Duncan McIntyre wrote: > > On Monday 25 April 2005 8:29 pm, Marcus Boerger wrote: > > > Of course, send them over as a .txt attachment (diff -u) or pot them > > > online somewhere. > >

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_API.c zend_API.h zend_compile.c zend_compile.h zend_reflection_api.c

2005-04-26 Thread Duncan McIntyre
On Monday 25 April 2005 8:29 pm, Marcus Boerger wrote: > Of course, send them over as a .txt attachment (diff -u) or pot them > online somewhere. > > best regards > marcus Diffs attached. Duncan [EMAIL PROTECTED] Zend]# diff -u zend_reflection_api.c zend_reflection_api.c.new --- zend_reflection_

[PHP-DEV] Re: Attributes support proposal

2005-04-25 Thread Duncan McIntyre
It's different because in your example there is no way of knowing that $AllowableValues refers to $WidgetType. You would have to explicitly code that relationship into every class which needed to know it. On Monday 25 April 2005 5:28 pm, Christian Schneider wrote: > Duncan McInty

[PHP-DEV] Re: Attributes support proposal

2005-04-25 Thread Duncan McIntyre
Sebastian - how's the parser going? I've finished my patches to make attributes work as native PHP tokens. You can get the code and read a discussion about the various possibilities for implementation at http://www.calligram.co.uk/oss/Attributes I really hope we can come to a consensus on how

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_API.c zend_API.h zend_compile.c zend_compile.h zend_reflection_api.c

2005-04-25 Thread Duncan McIntyre
Guys, These patches don't work for inheritance. E.g. getDocComment()."\n"; $prop = new ReflectionProperty("b","a"); echo "EXT : ".$prop->getDocComment()."\n"; ?> Prints: BASE: /** * This is the base class **/ EXT : /** * This is the base class **/ I have patc

[PHP-DEV] Re: [spam] AW: [PHP-DEV] Attributes support proposal

2005-04-18 Thread Duncan McIntyre
>The PHP development team is usually against these kinds of OOP syntax sugar >additions, search Google / the archives for: I don't think this is syntactic sugar, it goes deeper into the language than that if done right. I like your userland implementation, but it will get slow once you start w

Re: [PHP-DEV] Attributes support proposal

2005-04-18 Thread Duncan McIntyre
Wez, >(I added internals back in to the Cc:; presumably you missed that out >by accident in your reply) Thanks. Can you delete my email address from list as well please? :-) Grr. stupid me. Hello spam bots. I noticed I'd missed the list off cc, so I posted an edited version, which I guess you'

Re: [PHP-DEV] Attributes support proposal

2005-04-18 Thread Duncan McIntyre
firstName; // string value [persist:true] public $lastName; // string value [persist:true; serialize:true] public $dateOfBirth; // CDate function __construct() { $this->dateOfBirth = new CDate(); } } !- /example ---! -- -

[PHP-DEV] Attributes support proposal

2005-04-18 Thread Duncan McIntyre
Hello, I am playing around with an extension to the Zend Engine 2 to allow class properties and methods to be tagged with attributes. These attributes would then be accessible through the Reflection classes: !-- example -! class Storable { [serializer:toString; pers