# Best practice for storing functions in a struct

**URL:** https://discourse.julialang.org/t/best-practice-for-storing-functions-in-a-struct/9654
**Category:** General Usage
**Created:** [March 12, 2018, 4:00am UTC](https://discourse.julialang.org/t/best-practice-for-storing-functions-in-a-struct/9654 "2018-03-12T04:00:07Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)
#### Post date: [March 12, 2018, 10:58pm UTC](https://discourse.julialang.org/t/best-practice-for-storing-functions-in-a-struct/9654/11 "2018-03-12T22:58:51Z")

</div>

Honestly I don’t _think_ I’m doing anything OO here. I actually only have a vague understanding of what OO is. I have zero CS background, and used Matlab before coming to Julia, which, based on my understanding, is about as far from an OO language as it is possible to get. Incidentally, as I mentioned in my (much longer) answer to Steven, my first attempt at the framework I’m trying to put together used _only_ multiple dispatch, but it ended up being a little too unwieldy (admittedly I was a lot less experienced with Julia when I did it).

The current idea in my head still uses multiple dispatch quite a lot - all the functions in question are type-stable, and their output has the ability to be saved to a binary format on the SSD, based on the output type, and read in at a later time, again using known type information.

Cheers, and thanks for responding.

Colin

---

_[View the full topic](https://discourse.julialang.org/t/best-practice-for-storing-functions-in-a-struct/9654)._
