# Specifying Function Contract

**URL:** <https://discourse.julialang.org/t/specifying-function-contract/108983>\
**Category:** Internals & Design\
**Created:** [January 18, 2024, 8:24pm UTC](https://discourse.julialang.org/t/specifying-function-contract/108983 "2024-01-18T20:24:57Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 23, 2024, 6:44am UTC](https://discourse.julialang.org/t/specifying-function-contract/108983/13 "2024-01-23T06:44:01Z")

</div>

> [@nsajko](#):
>
> To expand, the way that Symbolics implements `==` breaks the [contract](https://docs.julialang.org/en/v1/base/math/#Base.:==) of the `==` function, which is one of the more important functions.

The contract of `==` explicitly does not necessarily return a boolean and there is a separate function in Julia if you want to guarantee a boolean, and that’s `isequal`.

> [@nsajko](#):
>
> The approach that [Symbolics.jl](https://juliahub.com/ui/Packages/Symbolics) took may allow it to be useful as a CAS, but prevents it from integrating into the Julia ecosystem well.

It does this so that it integrates with the Julia ecosystem because it keeps the contracts of the language and uses `isequal`s vs `==` appropriately. If it did not do this, then it would not work with general functions. This is how come tracing of numerical functions works.

---

_[View the full topic](https://discourse.julialang.org/t/specifying-function-contract/108983)._
