Why does `@inbounds` have no return value?

A = rand(1)
nothing == @inbounds A[1]

The last line returns true. I know that the intention is that a variable assignment should happen within the block passed to @inbounds, but why not have an expression return value as well? I’m just wondering if I’m missing something here.

https://github.com/JuliaLang/julia/pull/25033

3 Likes

:confetti_ball: :smile: