I'm using:
MyTestFunction() && ExecuteMe();
for quick and easy conditional execution. I'd like to improve the code readability more in some places by creating:
Single line guard statments I.E:
MyTestFunction() && return; //prevent execution of function early, but this isn't possible
Single line variable setters:
MyTestFunction() && myVar = 5;
(I realise I can do
myVar = MyTestFunction() || 5
; but that's not what I want)
Anyone see a nice way around this?