/dev/random – Random Thoughts On Programming In Parentheses – Coops – An introduction to chicken scheme’s object system

Genau. Wenn man schon sowas langweiliges wie „warum generic functions und nicht single-object-dispatch“ erklären will, dann mit solchen Beispielen:

A short example: Imagine you have a class human which is inherited by a class male and female. Now as we all have an urge to reproduce where to put a method for having sex? Create a method haveSex in the human class, duplicate it in male or female? What would the argument to such a class be? What about having sex with people of the same sex, toys, animals, buildings…

via /dev/random – Random Thoughts On Programming In Parentheses – Coops – An introduction to chicken scheme’s object system.

Dieser Beitrag wurde unter Asides abgelegt und mit , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.