Yeah I have read it. Multiple times, since I forget things and I still
don't remember all the things.
So basically the difference is that bitwise operators are functions. That
means its arguments get evaluated before they are passed in. That also
means, that if that function would be inlined, && would be same as &
because:
&(x::Bool, y::Bool) = box(Bool,and_int(unbox(Bool,x),unbox(Bool,y)))
I dont really understand that function, since I dont know what box, unbox
is, but I guess it is something like
&(x::Bool, y::Bool) = x && y
so if & would be inlined before x, y are evaluated, than && and & would
have identical meaning ( for booleans ), right?
Something like
function x()
println("x")
true
end
function y()
println("y")
false
end
@generated_inline and_gen(x::Bool, y::Bool)
return :(x && y)
end
and_gen(y(), x())