"Nathan Rixham" <nrixham@xxxxxxxxx> wrote in message news:88.0B.41390.8F512794@xxxxxxxxxxxxxxx > Afternoon all, > > I'd love to get some votes from my fellow developers on the following, and > indeed some opinions (especially from those who disagree). > > Recently I've been running in to a lot of frustrations with PHP when > dealing with Classes and Objects. Personally I strongly feel that these > need added in to PHP 6, for multiple reasons. > > I don't think the scope of this discussion covers the syntax of any > implementation, just if it needs implemented or not. > > a: Optional Static Typing > I'm finding an ever increasingly need to be able to staticly type > properties, parameters, return types etc (in classes) I know there is type > hinting but it's just not enough to do what one needs. Additionally > support for staticly typing primatives. Here's an example: If you really *need* to used a staticly typed language then don't use PHP, and don't try to change PHP to match your needs. > b: Object superclass > A base class type which all objects automagically extend, with (if nothing > else) a unique id / hashcode for each object (much like the Java Object > class). Failing this some form of function to get a unique reference > string for any variable. Example Why should each class automaticaly extend a base class? For what purpose? For what benefit? I can achieve what I want without this *feature*, so I don't need it. Why does each object need a unique id/hashcode? I have been using objects for years without this so it is not necessary, and does not provide any additional functionality. Why do you need a unique reference string for each variable? WTF! > c: Method overloading > TBH it's something I could live without, whereas a/b aren't, but it would > be an ideal addition to php? PHP does not need method overloading as is found in other languages as it has optional parameters with defaults. It is also possible to cast each parameter into wahetever type is necessary. It achieves the same result but using a different method. > > Thoughts, Opinions, Votes? would love to hear from you guys on this > > Regards! Absolute rubbish! You have obviously been used to a different language and have recently moved to PHP, but cannot get used to the fact that it *IS* a different language, therefore it has different syntax and achieves similar things in different ways. If your feeble brain can't handle the differences then I suggest you stick with your previous language and LEAVE PHP ALONE! That's just my opinion, of course. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php