traits

What are the traits that you look for in a software developer?

Specifically, what are the best indicators to forecast if someone will be a great developer, and also, someone that you would want to work with? Examples: education breadth of technical knowledge depth of knowledge in a particular domain interpersonal skills work on open source projects choice of tools, operating systems, and languag...

As a software developer, what are the traits that you look for in a manager?

Specifically, what are the best indicators to forecast if someone will be a great manager for a team of software developers, and also, someone that you would want to work for? Examples: education breadth of technical knowledge depth of knowledge in a particular domain interpersonal skills work on open source projects choice of tools,...

java traits or mixins pattern?

Is there a way to emulate mixins or traits in java? basically, I need a way to do multiple inheritance so I can add common business logic to several classes ...

What do you call an object level equivalent of Mixin/Traits system, is there a Pattern name for it?

I previously asked about what Mixins were, and have begun to get the gist of what the pattern means. But it got me wondering if there is a common pattern name for doing something like Mixins at an Object level as opposed to the Class level. Pseudo code (in some non existent language): Class MyClass { function foo() { ...

Are there scala-like mixins for C++?

Scala Mixins ...

What are stackable modifications?

I've been reading a book about Scala and there's mention of stackable modifications using traits. What are stackable modifications and for what purposes are they meant to be used? ...

Mixins vs. Traits

What is the difference between Mixins and Traits? According to Wikipedia, Ruby Modules are sort of like traits. How so? ...

Mixing Multiple Traits in Scala

Quick Note: Examples from this tutorial. Suppose I have the following Traits: Student, Worker, Underpaid, Young How could I declare a class (not instance) CollegeStudent with all these traits? Note: I am aware of the simplests cases, such as CollegeStudent with one or two Traits: class CollegeStudent extends Student with Worker ...

Scala Traits Usage

Can someone give explanation of Scala traits? I can't seem to find one anywhere. Also, what are the advantages of traits over extending an abstract class? ...

How can I have optional default constructor?

This class: template <class T> struct A { A() : t(T()) { } A(const T& t_) : t(t_) { } T t; }; won't compile if T doesn't have default constructor. This one: template <class T> struct A { A(const T& t_) : t(t_) { } T t; }; won't have default constructor even if T has default constructor. I want to have both - If...

Do I have to create a new object to mix in a Scala trait?

In Scala 2.8, calling groupBy() on a collection returns a Map where the values are collections, but I want a MultiMap. What's the easiest way to do the conversion? Can I avoid creating a new MultiMap and copying everything over? ...

Python Traits UI (Enthought)

I am working with some code that uses Traits UI to show a dialog from which the user is able to select two files: class Files(HasTraits): filename_1 = File(exists=True) filename_2 = File(exists=True) traits_ui = View( 'filename_1', 'filename_2', title = 'Select Geometry Files', buttons = ['OK', 'Ca...

Traits in javascript

How can I implement traits in javascript ? ...

What is the difference between scala self-types and trait subclasses?

Self-types seem to be important so I want to know why they are useful. From what I can gather, a self-type for a trait A: trait B trait A { this: B => } says that "A cannot be mixed into a concrete class that does not also extend B". (sidenote: I'm also seeing this fail in the REPL when mixed into an abstract class that does not e...

Scala traits vs abstract classes

In Scala, what is the advantage of using an abstract class instead of a trait (apart from performance)? At first glance it seems like abstract classes can be replaced by traits in most cases. ...

Difference between Abstract Class and Trait

What is the conceptual difference between abstract classes and traits? ...

scala: mixins depending on type of arguments

I have a set of classes of models, and a set of algorithms that can be run on the models. Not all classes of models can perform all algorithms. I want model classes to be able to declare what algorithms they can perform. The algorithms a model can perform may depend on its arguments. Example: Say I have two algorithms, MCMC, and Importa...

scala: traits and abstract methods override

I have a base abstract class (trait). It has an abstract method meth(). It is extended and implemented by several derived classes. I want to create a trait that can be mixed into the derived classes so that it implements meth() and then calls the derived class's meth() Something like: trait Foo { def foo() } trait M extends Foo { ...

boost add_reference not working with template parameter

hi I am trying to use type traits to add reference to a template parameter. template < class T > struct S { typename add_reference< T >::type reference; // reference member should always be a reference }; ... typedef Bar< Foo > type; S< type > s; // does not add reference, S:: reference is of type type, not type& However it does not ...

Conflicting nested inherited traits

Suppose I have the following code: trait Trait1 { trait Inner { val name = "Inner1" } } trait Trait2 { trait Inner { val name = "Inner2" } } class Foo extends Trait1 with Trait2 { // I want Concrete1 to be a Trait1.Inner not a Trait2.Inner class Concrete1 extends Inner val c = new Concrete1 } object Obj { def...