# Request: Mixins in elements

**URL:** https://talk.remobjects.com/t/request-mixins-in-elements/23892
**Category:** Elements
**Created:** [January 6, 2021, 1:11pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892 "2021-01-06T13:11:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Theo69](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@Theo69](https://talk.remobjects.com/u/Theo69)
#### Post date: [January 6, 2021, 1:11pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/1 "2021-01-06T13:11:53Z")

</div>

We recently got interface inheritance - thanks for that!

But in the complete picture, I still see one thing missing: Mixins.

> **[Mixin](https://en.wikipedia.org/wiki/Mixin)**
>
> In object-oriented programming languages, a mixin (or mix-in) is a class that contains methods for use by other classes without having to be the parent class of those other classes. How those other classes gain access to the mixin's methods depends on the language. Mixins are sometimes described as being "included" rather than "inherited". 
> Mixins encourage code reuse and can be used to avoid the inheritance ambiguity that multiple inheritance can cause (the "diamond problem"), or to work around...

Mixins will give an easy way to add standard functionality to classes without resorting to multiple-inheritance.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 6, 2021, 4:48pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/2 "2021-01-06T16:48:16Z")

</div>

Default Interface Implementations should provide this, mostly?

---

<div class="post-metadata">

### Author: ![Theo69](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@Theo69](https://talk.remobjects.com/u/Theo69)
#### Post date: [January 6, 2021, 5:09pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/3 "2021-01-06T17:09:05Z")

</div>

Hmmm - good one.  
Does it support fields too?

---

<div class="post-metadata">

### Author: ![LazarusRisen](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/l/7993a0/32.png) [@LazarusRisen](https://talk.remobjects.com/u/LazarusRisen)
#### Post date: [January 6, 2021, 5:37pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/4 "2021-01-06T17:37:31Z")

</div>

> [@Theo69](#):
>
> Does it support fields too?

afaik only properties and static fields

---

<div class="post-metadata">

### Author: ![Theo69](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/t/35a633/32.png) [@Theo69](https://talk.remobjects.com/u/Theo69)
#### Post date: [January 6, 2021, 5:51pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/5 "2021-01-06T17:51:54Z")

</div>

As far as I know: properties, methods and events.  
but events can not be default implemented and fields are missing, compared to mixins.

---

<div class="post-metadata">

### Author: ![LazarusRisen](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/l/7993a0/32.png) [@LazarusRisen](https://talk.remobjects.com/u/LazarusRisen)
#### Post date: [January 6, 2021, 6:55pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/6 "2021-01-06T18:55:55Z")

</div>

> [@Theo69](#):
>
> events

yea that true. This is smth to think about.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 7, 2021, 1:26pm UTC](https://talk.remobjects.com/t/request-mixins-in-elements/23892/7 "2021-01-07T13:26:08Z")

</div>

they probably (right now) can’t add storage; not sure, one way to find out.
