2010/1/29 Christian <[email protected]>: > Hi, > pretty good overview. > > But as implied in the comment of polymorphism the example doesn't > demonstrate polymorphism. Maybe you should add some lines like:
Yes, it does. That is an example of 'inclusion polymorphism'. > cdef A *c = new B() > > That would be polymorphism, or not? Don't know exactly if this is polymorphism. This is an example of a cast (upcast, downcast...). But it works. I'll update the wiki with this example. > > In "Overloading Operators" there is a comment > "Please avoid declaring C++ objects this way. Use 'cdef Foo *f = new Foo()'" > > But why should it be avoided, that doesn't make sense to me. > > Christian > > > Danilo Freitas schrieb: >> As you know, Robert is planning to put the work about C++ Support in >> next release. So, we have some new stuff, and people need to learn it. >> >> I wrote a very simple tutorial on wiki [0], with some examples. I >> think it's easy to learn (and use) it. >> >> So, if you have any questions about it, just ask here. >> >> [0] http://wiki.cython.org/gsoc09/daniloaf/progress >> > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- - Danilo Freitas _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
