# Order between \`@assume\_effects\` and \`@constprop\`

**URL:** <https://discourse.julialang.org/t/order-between-assume-effects-and-constprop/118001>\
**Category:** General Usage\
**Created:** [August 9, 2024, 2:00pm UTC](https://discourse.julialang.org/t/order-between-assume-effects-and-constprop/118001 "2024-08-09T14:00:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [August 9, 2024, 2:00pm UTC](https://discourse.julialang.org/t/order-between-assume-effects-and-constprop/118001/1 "2024-08-09T14:00:51Z")

</div>

I want to use both `@assume_effects :foldable` and `@constprop :aggressive` on some of my methods. Does the order matter? I.e., is there a difference between these two forms:

```julia
@assume_effects :foldable @constprop :aggressive f(a, b) = g(a, b)

```

and

```julia
@constprop :aggressive @assume_effects :foldable f(a, b) = g(a, b)

```

?

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [August 9, 2024, 2:58pm UTC](https://discourse.julialang.org/t/order-between-assume-effects-and-constprop/118001/2 "2024-08-09T14:58:31Z")

</div>

I wouldn’t think so. Both just add some `:meta` information to the code and it would not make sense to me if the order mattered. They even merge together into a single `Expr(:meta,...)`

```julia-repl
julia> @macroexpand Base.@assume_effects :foldable Base.@constprop :aggressive f(a, b) = g(a, b)
:(f(a, b) = begin
          $(Expr(:meta, :($(Expr(:purity, true, true, false, true, false, false, false))), :aggressive_constprop))
          #= REPL[5]:1 =#
          g(a, b)
      end)

julia> @macroexpand Base.@constprop :aggressive Base.@assume_effects :foldable f(a, b) = g(a, b)
:(f(a, b) = begin
          $(Expr(:meta, :aggressive_constprop, :($(Expr(:purity, true, true, false, true, false, false, false)))))
          #= REPL[6]:1 =#
          g(a, b)
      end)

```

Disclaimer: I am definitively no authority on compiler things though!
