# Multiple callbacks for same function, different arguments

**URL:** <https://forum.elixirforum.com/t/multiple-callbacks-for-same-function-different-arguments/15601>\
**Category:** Questions\
**Tags:** behaviours\
**Created:** [August 4, 2018, 5:39am UTC](https://forum.elixirforum.com/t/multiple-callbacks-for-same-function-different-arguments/15601 "2018-08-04T05:39:38Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/32/2677_2.png) [@OvermindDL1](https://forum.elixirforum.com/u/OvermindDL1)\
**Post date:** [August 6, 2018, 9:31pm UTC](https://forum.elixirforum.com/t/multiple-callbacks-for-same-function-different-arguments/15601/9 "2018-08-06T21:31:13Z")

</div>

> [@michalmuskala](#):
>
> Here’s an idea - use a protocol with two callbacks - `serialize_v1` and `serialize_v2` . For implementations where those are close enough or even the same, it’s pretty easy to delegate to a common implementation.

> Or use a protocol per version that can delegate to the lower version for the parts that are the same.

Yep, precisely my second suggestion. ^.^

---

_[View the full topic](https://forum.elixirforum.com/t/multiple-callbacks-for-same-function-different-arguments/15601)._
