|
Posted by Chung Leong on 07/07/06 14:36
Richard Levasseur wrote:
> Function overloading is a feature a lot of people want. Why not merge
> this with the existing PHP code? I'm sure they would love to have
> someone with your talent contributing!
Function overloading in Polar only works for standalone functions, not
class methods. As the intention here is to move away from OOP, that's
fine. I doubt that that's a limitation people would accept, since OOP
is the direction that PHP is heading.
Overloading in a dynamically typed language is rather different from
overloading in a strongly typed language like C++. In the latter,
resolution of function calls happens at compile time. In the former, it
has to happn at runtime. Overloading here is a form of dynamic
dispatch, akin to calling virtual methods on an object. Having two
dynamic dispatch mechanisms working in unison is probably too
confusing.
Navigation:
[Reply to this message]
|