Skip to content
D

DispatchDoctor.jl

The dispatch doctor prescribes type stability

by MilesCranmerFree

#4837in Developer Tools
0In stores

Description

DispatchDoctor is a Julia package that checks your code for type instability. You add the @stable macro to a function, a block, a module or…

Highlights

  • @stable macro that enforces type-stable return values
  • Error, warn or disable modes by default
  • Scoped checks with @stable and @unstable blocks
  • Per-package override through LocalPreferences.toml
  • Works on functions, blocks, modules and anonymous functions

Ratings & Reviews

No ratings yet

Be the first to rate DispatchDoctor.jl.

People also visit

R

Revise.jl

Automatically update function definitions in a running Julia session

Developer Tools
Launch
T

typescript-review

Review TypeScript and JavaScript code changes for compliance

AI Skills
Get
D

Digma

Digma helps you fix performance issues in your code

Developer Tools
Launch
R

React Doctor

Your agent writes bad React. This catches it

Developer Tools
Launch
T

typescript-magician

Designs complex generic types, refactors `any` types to strict alternatives

AI Skills
Get
F

Fallow

Codebase intelligence for TypeScript and JavaScript

Developer Tools
Launch

DispatchDoctor.jl FAQ

What does DispatchDoctor do?

It is a Julia package with a @stable macro that raises an error when a function returns a type that is not stable, so type instability is caught early.

How do I turn the checks off?

Wrap code in @unstable to disable it for that scope, or set default_mode to disable or warn instead of the default error.

Does the check slow my code down?

The README says type-stable code should compile the check away, so there is no runtime cost in that case. It warns this may not always be true and suggests checking with @code_llvm.

Can a package change the mode for its users?

Yes. A dispatch_doctor_mode key in LocalPreferences.toml, typically set with Preferences.jl, overrides the mode locally or globally.

Where is the source code?

The package is public on GitHub at MilesCranmer/DispatchDoctor.jl.

What are the best DispatchDoctor.jl alternatives?

Popular alternatives to DispatchDoctor.jl include Revise.jl, Digma and React Doctor. See all DispatchDoctor.jl alternatives

Developer Stuff

Badges