# How do I correctly make an "interface" in Julia?

**URL:** <https://discourse.julialang.org/t/how-do-i-correctly-make-an-interface-in-julia/115676>\
**Category:** General Usage\
**Created:** [June 15, 2024, 1:08am UTC](https://discourse.julialang.org/t/how-do-i-correctly-make-an-interface-in-julia/115676 "2024-06-15T01:08:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [June 15, 2024, 5:20am UTC](https://discourse.julialang.org/t/how-do-i-correctly-make-an-interface-in-julia/115676/3 "2024-06-15T05:20:48Z")

</div>

> [@Satvik](#):
>
> All you can currently do is use informal interfaces

That’s not entirely true. While the language itself doesn’t have built-in interfaces, there are several third-party packages that propose designs for this feature.

- Interfaces.jl
- RequiredInterfaces.jl
- [DuckDispatch.jl](https://github.com/mrufsvold/DuckDispatch.jl)

See also this discussion:

> [@\[RFC/WIP\] DuckDispatch.jl](https://discourse.julialang.org/t/rfc-wip-duckdispatch-jl/114930/):
>
> I’ve been working through an idea for a package, and I’d love your feedback. Tl;Dr: This package allows you to create method dispatches based on the methods defined for a type, not the place the type has in the type lattice. Here’s a little snippet to get the idea: @duck\_type struct FiniteIterable{T} # the signatures that must be defined to make a type a `FiniteIterable` function Base.iterate(::This)::Union{Nothing, Tuple{T, \<:Any}} end function Base.iterate(::This, ::Any)::Uni…

---

_[View the full topic](https://discourse.julialang.org/t/how-do-i-correctly-make-an-interface-in-julia/115676)._
