# @assert alternatives?

**URL:** <https://discourse.julialang.org/t/assert-alternatives/24775>\
**Category:** New to Julia\
**Created:** [May 30, 2019, 5:22pm UTC](https://discourse.julialang.org/t/assert-alternatives/24775 "2019-05-30T17:22:15Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [May 30, 2019, 11:30pm UTC](https://discourse.julialang.org/t/assert-alternatives/24775/9 "2019-05-30T23:30:05Z")

</div>

> [@JeffreySarnoff](#):
>
> we do not want to force the package user to start with `--check-bounds=no`

Ah, good point. If you want to get rid of assertion in the release mode, yet another possibility is to release version `x.y` and `x.(y - 1)` of `MayAssert` where `y` is an even number such that `@mayassert` from version `x.y` is a no-op and it’s `@assert` for `x.(y - 1)` (like old Linux kernel which used odd minor version to mean dev version). This way, you can use [`jlm`](https://discourse.julialang.org/t/22849) (a tool I made) to isolate the precompilation cache for “dev builds.”

Aside: even/odd versions work for a binary flag like this. But it would really be nice to have package options ([Package options · Issue #38 · JuliaLang/Juleps · GitHub](https://github.com/JuliaLang/Juleps/issues/38), [Package Options · Issue #458 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/458)) so that we can, e.g., toggle only a subset of assertions.

---

_[View the full topic](https://discourse.julialang.org/t/assert-alternatives/24775)._
