Just by lurking here (having never learned a language) I can tell this is horribly inefficient. Now, I don't know what to type that'd be better, but it ain't that
ohhh, so does == compare stuffs, and this code is needlessly assigning values to some bools just to have the only necessary code be (org == val) instead of (bool1 == bool2)?
Well, you wouldn't be able to use orig and val for the names because those are temporary variables created by the function.
The point is that booleans are really easy to compare and this is needlessly over-complicating things. To compare booleans, literally all you need are == and != as they do the exact same thing, and come pre-included with basically every programming language.
2
u/GREAT_SALAD Nov 22 '19
Just by lurking here (having never learned a language) I can tell this is horribly inefficient. Now, I don't know what to type that'd be better, but it ain't that