Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Mixins


In the News (Sun 23 Nov 08)

  
  Mixin - Wikipedia, the free encyclopedia
Mixins were first used in Flavors, which was an approach to object-orientation used in Lisp Machine Lisp.
The advantage of mixins is that they encourage code reuse and avoid well-known pathologies associated with multiple inheritance, but mixins introduce their own set of compromises.
With mixins the class definition defines only the attributes and parameters associated with that class; methods are left to be defined elsewhere, as in Flavors and CLOS, and are called "generic functions".
en.wikipedia.org /wiki/Mixin   (293 words)

  
 D Programming Language - Mixins
Unlike a template instantiation, a template mixin's body is evaluated within the scope where the mixin appears, not where the template declaration is defined.
Mixins are evaluted in the scope of where they appear, not the scope of the template declaration:
This example uses a mixin to implement a generic Duff's device for an arbitrary statement (in this case, the arbitrary statement is in bold).
digitalmars.com /d/mixin.html   (554 words)

  
 Post-object programming - Wikipedia, the free encyclopedia
Post-object programming emphasizes mixins, delegation, and aspects, as well as heterogeneous groups and multimethods.
For example, the delegation pattern is a workaround for mixins, delegation, and aspects, and the abstract factory pattern and visitor pattern are workarounds for heterogeneous groups and multimethods.
Mixins are classes that have inheritance defined with respect to an interface, not to a class.
en.wikipedia.org /wiki/Post-object_programming   (322 words)

  
 Mixins   (Site not responding. Last check: 2007-10-04)
Layer composition in Java Layers is based on the use of mixins.
Mixins are not supported in standard Java, but are available in some languages that support parameterized polymorphism such as C++.
Mixins are useful because they allow a set of classes to be specialized in the same manner, with the specializing code residing in a single class definition.
www.cs.utexas.edu /users/richcar/JLMixins.html   (130 words)

  
 Diagnosing Java code: Killer combo -- Mixins, Jam, and unit testing
Mixins in Jam, like ordinary classes, define types; mixin instantiations have both the type of the mixin and the type of the parent.
Mixins are generally motivating to programmers as a way to get back the power of multiple inheritance in a language without all the pitfalls.
In the case of mixins, this would mean that the parent class of a mixin would be erased to the bound of the type variable which is clearly not what we would want.
www-128.ibm.com /developerworks/java/library/j-diag1203   (2731 words)

  
 JOT: Journal of Object Technology - Theory of Classification, Part 15: Mixins and the Superclass Interface, Anthony ...
Mixins were the first attempt to provide flexible solutions to some of the same problems that are currently addressed using aspects in aspect-oriented programming, which are woven together in a similar way.
Folding in a number of mixins required the linearisation of their properties – in fact, this was no different from the general problem of multiple inheritance.
Bracha and Cook revived interest in mixins when they demonstrated how the models of inheritance in languages as diverse as Smalltalk, Beta and CLOS could all be mapped onto a simpler model based on the composition of mixins [8].
www.jot.fm /issues/issue_2004_11/column1   (3394 words)

  
 Mixins: Something Else You Can't Do With Java Generics?
The paper "A First-Class Approach to Genericity" introduces the idea of the mixin, which seems to be quite a powerful concept, and then shows that you can't do it with Java generics.
The term mixin seems to have acquired numerous meanings over time, but the fundamental concept is that of mixing in capabilities in the same way that you would mix adornments like cookies and candy pieces into ice cream.
However, a more interesting and elegant approach to mixins is using parameterized types, whereby a mixin is a class that inherits from its type parameter.
www.artima.com /weblogs/viewpost.jsp?thread=132988   (570 words)

  
 Diagnosing Java code: Java generics without the pain, Part 4
Because a mixin's parent may be instantiated with a type parameter, there is no way for the type checker to determine all cases of accidental method overriding.
In the context of mixins outside of generic types, Felleisen, Flatt, and Krishnamurthi proposed a good solution to this problem at the 1998 ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (see Resources): to resolve references to clashing methods based on the context in which the mixin instantiation is used.
In this solution, a mixin is associated with a view that determines which method to call in the case of a name clash.
www-106.ibm.com /developerworks/java/library/j-djc05133.html   (2055 words)

  
 EventState xref   (Site not responding. Last check: 2007-10-04)
102 * @param mixins mixins assigned to the parent node.
146 * @param mixins mixins assigned to the parent node.
178 * @param mixins mixins assigned to the parent node.
incubator.apache.org /jackrabbit/xref/org/apache/jackrabbit/core/observation/EventState.html   (1430 words)

  
 Programming Ruby: The Pragmatic Programmer's Guide   (Site not responding. Last check: 2007-10-04)
For a mixin, this means that the module that you mix into your client class (the mixee?) may create instance variables in the client object and may use
For the most part, mixin modules don't try to carry their own instance data around---they use accessors to retrieve data from the client object.
But if you need to create a mixin that has to have its own state, ensure that the instance variables have unique names to distinguish them from any other mixins in the system (perhaps by using the module's name as part of the variable name).
www.rubycentral.com /book/tut_modules.html   (1560 words)

  
 Mixins - Confluence
At compile time mixin information can be provided, in which case all instances of the class receiving the mixin have the mixed traits
Similarly, if multiple mixins are specified, the first time a method is defined is the one that is used.
Mixins can define their own internal instance variables, only accessible to the mixed in class itself (heading, locationX, locationY).
docs.codehaus.org /display/GroovyJSR/Mixins?decorator=printable   (463 words)

  
 Modular Object-Oriented Programming with Units and Mixins
In contrast, the combination of units and mixins solves the problem simply and elegantly, and it addresses the reuse of both the original component and its clients.
We have demonstrated how units and mixins apply to a specific example, but a general principle is at work: specifying connections between modules or classes separately from their definitions.
Mixins tend to be computationally more expensive than classes, but the cost is small [14].
www.cs.utah.edu /plt/publications/icfp98-ff/paper.shtml   (5762 words)

  
 [No title]   (Site not responding. Last check: 2007-10-04)
ANSWER: Mixins rely on the "sibling call" mechanism described in the ARM on p234: "A call to a virtual function through one path in an inheritance structure may result in the invocation of a function redefined on another path.
The basic principle of mixin is simply that you should defer binding of the implementation of an interface until the last possible place, and that the basic functional primitives be encapsulated in small, independent abstract classes.
Mixins are prefered where possible because they are statically and dynamically secure, and because construction and destruction are managed automatically.
cpptips.hyperformix.com /cpptips/mixins   (3525 words)

  
 NAPOLI - Firenze - Unit Papers
This work presents an object-oriented calculus based on higher-order mixin construction via mixin composition, where some software engineering requirements are modeled in a formal setting allowing to prove the absence of message-not-understood run-time errors.
Mixin composition is shown to be a valuable language feature enabling a cleaner object-oriented design and development.
MoMi (Mobile Mixins) is a coordination language for mobile processes that communicate and exchange object-oriented code in a distributed context.
music.dsi.unifi.it /napoli/firenze/papersfi.html   (3687 words)

  
 java.net: Writing Mixins using AspectJ
Mixins enable us to uniformly extend a set of classes with a set of fields and methods.
This article shows what mixins are and explains how AOP constructs in AspectJ allow us to use this technique to isolate crosscutting concerns, with an example.
This is where AOP complements OO, by introducing the concept of a mixin, which is not properly addressed by an object-oriented language like Java.
today.java.net /pub/a/today/2005/12/15/writing-mixins-with-aop.html   (549 words)

  
 Jeanne's Apple Guide FAQs | Mixins   (Site not responding. Last check: 2007-10-04)
control when a mixin mixes into the parent guide?
refer in a mixin to elements in the parent guide?
does the guide look strange when a mixin is active?
www.jaedworks.com /appleguide/guide-faq/mixins   (37 words)

  
 Mixins for PHP
In the process of toying with the language constructs, I found that there is a technique for implementing mixins.
Incidentally, that PHP does not implement mixins natively is not a criticism of PHP.
Updated versions of the code are available at the Codelab article or you can find the "Mixins" section of Javuh.inc in CVS (which abstracts out alias_method).
www.advogato.org /article/470.html   (3067 words)

  
 Mixins   (Site not responding. Last check: 2007-10-04)
A mixin is a class parameterization modeled on a paper published by Flatt, Felleisen, and Krishnamurthi, available at
The implementation of these mixins in MzScheme is with the combination of
The framework provides a macro to simplify the checking and implementation of these mixins.
www.cs.rice.edu /CS/PLT/packages/doc/framework/node8.htm   (183 words)

  
 [plt-scheme] Re: Multiple inheritance problem with mixins
They all used to be defined as one mixin, and I'm now refactoring them into three components: compile-on-save, online-error-checking, and tab-completion.
So I have five mixins, three for the components and two that are each shared by a pair of components.
Each component has no control over what other mixins might be applied (the user might have only 1 of the tools installed), so right now I check for "implements?" at the shared mixin functions.
www.cs.brown.edu /pipermail/plt-scheme/2005-February/007807.html   (460 words)

  
 Mixins   (Site not responding. Last check: 2007-10-04)
The Tkinter module provides classes corresponding to the various widget types in Tk, and a number of mixin and other helper classes (a mixin is a class designed to be combined with other classes using multiple inheritance).
class is used as a mixin by the root window and widget classes.
classes are used as mixins by the widget classes.
www.pythonware.com /library/tkinter/introduction/x275-mixins.htm   (289 words)

  
 AspectSharp Language Documentation - Castle   (Site not responding. Last check: 2007-10-04)
You must obey to a few rules to use the Aspect# language, and the first rule is that order matters.
An aspect section defines which mixins and which pointcuts will be applied to a type or a set of types:
You use one or more include to add mixins to the resulting type in an aspect definition.
www.castleproject.org /index.php/AspectSharp_Language_Documentation   (655 words)

  
 Overview (Julia Documentation)
A mixin class is a class whose super class is specified in an abstract way, by specifying the minimum set of fields and methods it should have.
These dependencies are summarized in the figure below (an arrow from a mixin A to a mixin B means that A needs a base class that provides the same fields and methods as B - it does not mean that A requires exactly the B mixin).
This mixin should be put at the end of the mixin list, in order to notify the sub components only after all the checks have been passed.
fractal.objectweb.org /current/doc/javadoc/julia/overview-summary.html   (5794 words)

  
 Apple Guide FAQ | Compiling Mixins
You can create a mixin without using the SYM file, but it will only be able to add topic areas and index terms; it will not be able to replace existing content or make changes to the parent guide's topic list or index.
If you include topic areas in the mixin, they'll be appended to the end of the parent guide's topic list when the mixin is active.
These commands are not required for a mixin; you can append new topic areas and index terms simply by including them in your mixin source.
www.jaedworks.com /appleguide/guide-faq/mixins/set-up.html   (703 words)

  
 Wiki4D (the wiki for the D programming language): MixinsVsMacros   (Site not responding. Last check: 2007-10-04)
Mixins are the same (and different from) templates just like C++ templates are the same and different from macros.
Some of the differences are: 1) Mixins substitute in parsed declaration trees that pass muster with the language syntax, macros substitute in arbitrary preprocessor tokens that have no organization.
9) Mixin value arguments with side effects are evaluated once, macro value arguments get evaluated each time they are used in the expansion (leading to weird bugs).
www.wikiservice.at /wiki4d/wiki.cgi?MixinsVsMacros   (304 words)

  
 Observable Mixins   (Site not responding. Last check: 2007-10-04)
The problems with the Observable base class could be avoided through the use of mixins.
Unfortunately, the traditional mixin model is not capable of changing existing methods to include new method calls.
However, Observable is easily implemented as an active mixin using a JOIE transformer.
www.usenix.org /publications/library/proceedings/usenix98/full_papers/cohen/cohen_html/node24.html   (321 words)

  
 Keith Devens - Weblog: Mixins in PHP (Or, I hate PHP volume 2) - December 12, 2004
Mixins in PHP (Or, I hate PHP volume 2)
But, I came across this post by whytheluckystiff over at Advogato from over two years ago where he tries to fake it (it turns out I blogged that link back then but had forgotten about it).
The only thing I would have liked is if the constructor for the mixin class could have been called upon mixing, but I don't think even Ruby does that for mixins.
keithdevens.com /weblog/archive/2004/Dec/12/mixins-in-PHP   (789 words)

  
 Enhancing Object-Based System Composition through Per-Object Mixins   (Site not responding. Last check: 2007-10-04)
Per-object mixins are implemented in the scripting language XOTCL as a straightforward extension of its method chaining mechanism and enables the developer to mix classes into the precedence order of an arbitrary object.
Per-object mixins can be used to implement state-specific behavior changes in a clean way.
We present per-object mixins as a general approach to hide object specifics from client objects transparently.
csdl.computer.org /comp/proceedings/apsec/1999/0509/00/05090522abs.htm   (201 words)

  
 [Python-Dev] Mixins.   (Site not responding. Last check: 2007-10-04)
Would it be usefull to define new magic class variable __mixins__ for a new style classes, which will accept list of classes and will drop all members of them into definition of class before they went to metaclass.
It is common to use multiple inheritace in place of mixin.
I think, it would be simpler to make mixins in one true standart way.
mail.python.org /pipermail/python-dev/2005-September/056481.html   (224 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.