# \[ANN\] DispatchDoctor.jl 🩺 – offers you a prescription for type stability

**URL:** https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837
**Category:** Package Announcements
**Created:** [May 28, 2024, 1:07pm UTC](https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837 "2024-05-28T13:07:16Z")
**Posts on this page:** 1
**Showing post:** 23

<div class="post-metadata">

### Author: ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)
#### Post date: [May 30, 2024, 8:35am UTC](https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837/23 "2024-05-30T08:35:48Z")

</div>

To add one more tip @alfaromartino — I would recommend using Cthulhu.jl for this as it lets you descend into the function body.

I guess another option is for me to leave the function body in both functions? Then inspection tools like `@code_warntype` would work. And I suppose it could improve source tracking for errors, and simplify the propagation of other macros (@matthias314 - relevant to your question too).

You would still generate the second function and call `promote_op` on it; but then just not actually use it. It would exclusively be for testing the type inference of itself.

---

_[View the full topic](https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837)._
