23 lines
1.2 KiB
Markdown
23 lines
1.2 KiB
Markdown
---
|
|
id: 432af9b5-0143-4c03-93d5-5ecc3db61936
|
|
projectId: f2d5e497-5a16-4033-864a-0df066e05e17
|
|
title: '/dev/random - Random Thoughts On Programming In Parentheses - Coops - An introduction to chicken scheme''s object system'
|
|
slug: devrandom-random-thoughts-on-programming-in-parentheses-coops-an-introduction-to-chicken-schemes-object-system
|
|
status: published
|
|
createdAt: '2011-01-21T14:03:36.000Z'
|
|
updatedAt: '2011-02-28T15:18:35.000Z'
|
|
tags:
|
|
- lisp
|
|
- programmieren
|
|
- scheme
|
|
categories:
|
|
- asides
|
|
author: hugo
|
|
publishedAt: '2011-01-21T13:03:36.000Z'
|
|
---
|
|
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](http://pestilenz.org/~ckeen/blog//posts/oo-in-scheme.html).
|