one small observation porting some c++ code: not h...
# language-proposals
e
one small observation porting some c++ code: not having the possibility to have
valueChanged |= whatever()
introduced on kotlin side a bug,
whatever()
was never executed when
valueChanged == true
, (
valueChanged = valueChanged || whatever()
solved by flipping the or operands)
a
What does
whatever()
do that it needs to be called? And what are you proposing?
e
something necessary, but that's not the point. I'm just pointing out the bug introduced by not having that
i
Then it'd more clear to use infix or:
valueChanged = valueChanged or whatever()
e
with infix would
whatever()
be always executed?
i
Yes, infix function are not short-circuited. You can inspect bytecode to be sure.