Talk:Mixin
From Wikipedia, the free encyclopedia
Contents |
[edit] Confusing analogy
The bowl and ingredient analogy is confusing—The preceding unsigned comment was added by 141.154.250.176 (talk • contribs) 14:53, 2 June 2004.
[edit] Are mixins bad?
I always wondered: are Mixin's "bad"? I'm sure the proper answer is that they're useful in some scenarios, but detrimental in others. What should I look out for? What are similar paradigms that get mistakenly used as Mixin's? I don't want to suffer from Golden hammer syndrome, if there's something that answers the problem better... --Eddie Parker 13:19, 2 May 2005 (UTC)
[edit] Flavors
Link to Flavors needs a substantive page.—The preceding unsigned comment was added by 217.43.207.44 (talk • contribs) 22:42, 18 June 2005.
[edit] Error in "Comentary"
Inheritance can indeed be used to refactor common behavior, so mixins are just another way of getting the same functionality, AFAIK. (*)
Well, CLOS generic functions allow multiple dispatching, but I don't know if this has something to do with mixins... Maybe it cannot be donne (except for the trick in Visitor) with the other sintax?
(*) Mixins add the benefit of being suitable for some aspect-oriented programming. This is because they can refactor methods from classes that have nothing in common (so it would be a bad practice to make them inherit from a common base). This is also true with the very similar way of ArtScript for defining class attributes. Anyway I wonder wether the benefits of AOP which mixins bring couldn't be reached using multiple inheritance...
[edit] Example
Could someone familiar with this concept provide a simple code example? John (Jwy) 18:22, 1 April 2006 (UTC)
[edit] Misleading and incomplete
I've just accidentically stumbled into this article, and I get the severe feeling that it is misleading and incomplete. Most importantly it doesn't really give substantial information, what a mixin is. Then, it is too fixated on specific programming languages. Using mixins is a a programming style, which by and large can be used in nearly every programming language. Just google for Mixin+C++ to get a hint. E.g. Smaragdakis and Batory.
I only have time for this notice right now, but I'll have a try at the article in the future.
Pjacobi 12:30, 12 April 2006 (UTC)
[edit] Definition and implementation - Missing Javascript
Given the popularity of Javascript, it should probably get added to the list of languages that use Mixin for object creation. In Javascript, you define the class and add the methods afterwards. You can add methods new at runtime.
data64 17:59, 24 September 2006 (UTC)