Please give me the idea of mixin classes or
reference where I can read about that concept.
What purpose they stands for ?
In which circumstances they're useful ?
--
Vladimir Zolotych ······@eurocom.od.ua
>>>>> "VVZ" == Vladimir V Zolotych <······@eurocom.od.ua> writes:
VVZ> Please give me the idea of mixin classes or reference where I
VVZ> can read about that concept. What purpose they stands for ?
VVZ> In which circumstances they're useful ?
PLEASE DO MY HOMEWORK
~Mr. Bad
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mr. Bad <······@pigdog.org> | Pigdog Journal | http://pigdog.org/
···········@···@u1AntQcZ81Y4c2tJKd1M87cZvPoQAge/pigdog+journal//
"Statements like this give the impression that this article was
written by a madman in a drug induced rage" -- Ben Franklin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On Sun, 22 Apr 2001 16:42:46 +0300, "Vladimir V. Zolotych"
<······@eurocom.od.ua> wrote:
> Please give me the idea of mixin classes or
> reference where I can read about that concept.
This book discusses some examples:
"Object-Oriented Programming in Common Lisp
A Programmer's Guide to CLOS"
Sonya E. Keene
Addison-Wesley, 1989
Paolo
--
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
·······@hotmail.com wrote:
>
> They are small classes used to provide or override some feature in preexisting
> classes, using multiple inheritance.
[snip]
Understood. As usual things becomes much simpler
when properly explained.
For learners (like me) who find it difficult to get book like
"PG to CLOS" Sonya E. Keene here is reference on article
in Linux Journal that discusses mixins with Python.
http://www2.linuxjournal.com/lj-issues/issue84/4540.html
(thanks to Paul Foley).
--
Vladimir Zolotych ······@eurocom.od.ua
"Vladimir V. Zolotych" <······@eurocom.od.ua> writes:
> (defclass customer () [...])
> (defclass phone-contact () [...])
> (defclass email-contact () [...])
> (defclass customer-phone-contact (customer phone-contact))
> (defclass customer-phone-email-contact
> (customer phone-contact email-contact))
The real power of this is shown when you also do:
(defclass friend () ()) ;i.e., not a subclass of customer, nor vice versa
(defclass friend-phone-contact (friend phone-contact))
(defclass friend-phone-email-contact (friend phone-contact email-contact))
etc.
In most other languages, the first example above (customers only) can be
worked around by subclassing customer appropriately. But making the same
"nuissance methods" appear on disjoint classes without copying their text
is hard to arrange for.
In article <·················@eurocom.od.ua>,
"Vladimir V. Zolotych" <······@eurocom.od.ua> wrote:
> Here is another reference about mixins subject
>
> http://oonumerics.org/tmpw00/eisenecker.html
I couldn't stop laughing while reading that page.
In the end I felt very sorry for these guys...
Life is tough. What did they do in an earlier life
to deserve being reborn as a C++ researcher?