# Using the type and functions for dispatch purposes without loading all codes of its owner package

**URL:** <https://discourse.julialang.org/t/using-the-type-and-functions-for-dispatch-purposes-without-loading-all-codes-of-its-owner-package/79951>\
**Category:** Internals & Design\
**Tags:** ttfp\
**Created:** [April 24, 2022, 6:22pm UTC](https://discourse.julialang.org/t/using-the-type-and-functions-for-dispatch-purposes-without-loading-all-codes-of-its-owner-package/79951 "2022-04-24T18:22:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 24, 2022, 6:38pm UTC](https://discourse.julialang.org/t/using-the-type-and-functions-for-dispatch-purposes-without-loading-all-codes-of-its-owner-package/79951/2 "2022-04-24T18:38:29Z")

</div>

It don’t think this makes much sense for Julia.

> [@JohnnyChen94](#):
>
> Like C/C++'s header file

Because of that there is a compiler and a linker step in these languages where in Julia we only have the compiler step. Introducing something like you propose would make a linking step needed so nothing is won for the TTFX problem.  
And as soon as you are calling into the code you need to import it and compile it, so actually the compilation is just postponed.

Perhaps what you really want is, that we could only be dependent on a small part of another package. Only of those parts you are using in your own package. This is more about of better design of the package you are dependent of.

Anyways, a syntax for interface/API definition could be something beneficial, e.g. see this discussion: [Base.modules\_warned\_for silently removed in 1.8](https://discourse.julialang.org/t/base-modules-warned-for-silently-removed-in-1-8/79035)

---

_[View the full topic](https://discourse.julialang.org/t/using-the-type-and-functions-for-dispatch-purposes-without-loading-all-codes-of-its-owner-package/79951)._
