Re: Keywords and Namesapces
- Posted by jimcbrown (admin) Oct 04, 2011
- 39276 views
mattlewis said...
jimcbrown said...
mattlewis said...
Vinoba said...
Yuck. No. I'm not going to do that….. Matt
Reason? Is this not a scientific discussion?
That creates code that's slower, more difficult to maintain and harder to use.
Matt
It has precedents though. A lot of OOP libraries for Euphoria (llamagtk being one of them) do something like this where the real method that gets called depends on the type of the object.
I wonder what that says about OOP?
It doesn't say anything about OOP in general. Polymorphism can be a great thing. But adding an extra parameter isn't quite the same thing. There are some places in wxEuphoria where polymorphism is used at the C++ level, so the same function can be used for different types of objects.
Matt
This seems like the Right Thing(tm) to do.