Relative Content

Tag Archive for polymorphism

Novel polymorphism – any reasons for this code?

As part of my work on a legacy C# application I’ve come across a novel (to me) use of an interface & concrete implementations. I can’t think of any reason why you’d do the following, but I’m pretty thick, so maybe someone else can?

Besides polymorphism, what’s compelling about OOP? [duplicate]

This question already has answers here: Advantages of object-oriented programming [closed] (11 answers) Closed 11 years ago. When I first came to OOP (at first in Java, and then C++) after years of working in C and VB, it was amazing. The idea of extending existing behaviour and operating generically over things of related types […]

how to follow python polymorphism standards with math functions

So I am reading up on python in Mark Lutz’s wonderful LEARNING PYTHON book. Mark makes a big deal about how part of the python development philosophy is polymorphism and that functions and code should rely on polymorphism and not do much type checking. However, I do a lot of math type programming and so the idea of polymorphism does not really seem to apply–I don’t want to try and run a regression on a string or something. So I was wondering if there is something I am missing here. What are the applications of polymorphism when I am writing functions for math–or is type checking philosophically okay in this case.

how to follow python polymorphism standards with math functions

So I am reading up on python in Mark Lutz’s wonderful LEARNING PYTHON book. Mark makes a big deal about how part of the python development philosophy is polymorphism and that functions and code should rely on polymorphism and not do much type checking. However, I do a lot of math type programming and so the idea of polymorphism does not really seem to apply–I don’t want to try and run a regression on a string or something. So I was wondering if there is something I am missing here. What are the applications of polymorphism when I am writing functions for math–or is type checking philosophically okay in this case.

how to follow python polymorphism standards with math functions

So I am reading up on python in Mark Lutz’s wonderful LEARNING PYTHON book. Mark makes a big deal about how part of the python development philosophy is polymorphism and that functions and code should rely on polymorphism and not do much type checking. However, I do a lot of math type programming and so the idea of polymorphism does not really seem to apply–I don’t want to try and run a regression on a string or something. So I was wondering if there is something I am missing here. What are the applications of polymorphism when I am writing functions for math–or is type checking philosophically okay in this case.

how to follow python polymorphism standards with math functions

So I am reading up on python in Mark Lutz’s wonderful LEARNING PYTHON book. Mark makes a big deal about how part of the python development philosophy is polymorphism and that functions and code should rely on polymorphism and not do much type checking. However, I do a lot of math type programming and so the idea of polymorphism does not really seem to apply–I don’t want to try and run a regression on a string or something. So I was wondering if there is something I am missing here. What are the applications of polymorphism when I am writing functions for math–or is type checking philosophically okay in this case.

how to follow python polymorphism standards with math functions

So I am reading up on python in Mark Lutz’s wonderful LEARNING PYTHON book. Mark makes a big deal about how part of the python development philosophy is polymorphism and that functions and code should rely on polymorphism and not do much type checking. However, I do a lot of math type programming and so the idea of polymorphism does not really seem to apply–I don’t want to try and run a regression on a string or something. So I was wondering if there is something I am missing here. What are the applications of polymorphism when I am writing functions for math–or is type checking philosophically okay in this case.

Two components offering the same functionality, required by different dependencies

I’m building an application in PHP, using Zend Framework 1 and Doctrine2 as the ORM layer. All is going well. Now, I happened to notice that both ZF1 and Doctrine2 come with, and rely on, their own caching implementation. I’ve evaluated both, and while each has its own pro’s and cons, neither of them stand out as superior to the other for my simple needs. Both libraries also seem to be written against their respective interfaces, not their implementations.

Two components offering the same functionality, required by different dependencies

I’m building an application in PHP, using Zend Framework 1 and Doctrine2 as the ORM layer. All is going well. Now, I happened to notice that both ZF1 and Doctrine2 come with, and rely on, their own caching implementation. I’ve evaluated both, and while each has its own pro’s and cons, neither of them stand out as superior to the other for my simple needs. Both libraries also seem to be written against their respective interfaces, not their implementations.