Re: Re: new overloading feature?

From: Date: Fri, 13 May 2005 15:35:47 +0000
Subject: Re: Re: new overloading feature?
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-16239@lists.php.net to get a copy of this message
Hello Alex, Friday, May 13, 2005, 5:18:43 PM, you wrote: > 2005/5/12, Marcus Boerger <mail@marcus-boerger.de>: >> Hello Alex, >> >> but PHP is a class based langauage which is very much different from > what is a class based language? It means the language is based around the idea that all objects refer to a certain class and you cannot dynamically add, change or remove members (though php allows to dynamically add properties). >> prototype based langauages. Apart from that i already said that it would be >> possible to add a special 'called_self' (or better name) syntax to support >> what you want - only that would slow doen execution even if you won't use >> it. And since what you want is not the correct way of doing it in a class > that is the only correct way to use factories in a dynamic language, > everything else > leads to code duplication and / or crapy code. Yes but for php supporting this would means that we'd need to make php slower. And where is the problem in a little code duplication? Maybe you want templates? Maybe you're in the wrong language. -- Best regards, Marcus mailto:mail@marcus-boerger.de

« previous php.internals (#16239) next »