nunia [个人文集]
加入时间: 2005/11/04 文章: 2184
经验值: 5079
|
|
|
作者:nunia 在 寒山小径 发贴, 来自 http://www.hjclub.org
that 'OOP Concept explained: Polymorphism' is a fine exercise.
Good until the last example of applying an concept. I'd rather think of it as just an illustration of suicidal psycho mal-function.
//now we loop through the holes and fuck them all with the same Penis
Penis p = new Man().Penis;
foreach(Hole h in holes) {
p.Fuck(h);
}
There are other types of polymorphism. In particular the compile time polymorphism [ as opposed to runtime ]. C++ Templates that let programmer 'write dick function that will not only work with any hole but don't spend a lot of time fumbling to get it in the right hole during the main event...
My feedback to the writer of the original article is this:
first of all, that is a fine exercise.
but can you explain to me, why Hole is declared an abstract class but seldom do prgrammers think of the need to add an abstract layer for the Penis class?
In Buddhism practice, the objective of the Ying flourishing the Yang can be your advanced chapter of OOP concept explained.
作者:nunia 在 寒山小径 发贴, 来自 http://www.hjclub.org |
|
|