# How to write idiomatic (non-OOP) Julia version of OOP design pattern?

**URL:** <https://discourse.julialang.org/t/how-to-write-idiomatic-non-oop-julia-version-of-oop-design-pattern/83548>\
**Category:** General Usage\
**Tags:** design-pattern\
**Created:** [June 30, 2022, 4:35am UTC](https://discourse.julialang.org/t/how-to-write-idiomatic-non-oop-julia-version-of-oop-design-pattern/83548 "2022-06-30T04:35:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Post date:** [July 7, 2022, 4:25am UTC](https://discourse.julialang.org/t/how-to-write-idiomatic-non-oop-julia-version-of-oop-design-pattern/83548/2 "2022-07-07T04:25:07Z")

</div>

This might help.

> [@Composition and inheritance: the Julian way](https://discourse.julialang.org/t/composition-and-inheritance-the-julian-way/11231):
>
> I am a relatively newbie and I am wondering what is the most appropriate Julian way to reuse the code. I don’t want to trigger discussions on topics already discussed a million times. This post simply aims to lay down a clear list of rules to be followed to write good Julia code, and pose a couple of questions. Let’s start with an example: I have a type Person mutable struct Person \<: AbstractPerson name::String age::Int end and a lot (hundreds) of methods dealing with it. Now I wa…

if you search the forums for “oop”, you will find many threads that have discussed this topic.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-write-idiomatic-non-oop-julia-version-of-oop-design-pattern/83548)._
