# Mixin instead of include for common function?

**URL:** <https://forum.kirupa.com/t/mixin-instead-of-include-for-common-function/312791>\
**Category:** Uncategorized\
**Created:** [August 12, 2010, 3:57pm UTC](https://forum.kirupa.com/t/mixin-instead-of-include-for-common-function/312791 "2010-08-12T15:57:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [August 12, 2010, 3:57pm UTC](https://forum.kirupa.com/t/mixin-instead-of-include-for-common-function/312791/1 "2010-08-12T15:57:04Z")

</div>

If I have say a dozen classes, that may or may not be called at runtime, and that all have a common function; is there an advantage to creating a separate class with just this common function in it and then having it mixin at runtime ?

I am wondering would this allow me to reduce the size of each class and thereby the swf file size? I figure this must be wrong else why would we ever extend anything when we could just mixin the functionality we want at runtime?
