Re: Require spaces around binary ops
Posted: Fri Jul 12, 2013 6:26 am
Probably !. would be the most fitting match given existing choices for deref (DOT) and non-nil coalesce.
Other langs use ?. and it fits with the nilability association ( nilTyping and nil-coalesce using ?)
I've made ticket:341 as a placeholder for enhancement of requiring spaces around binary ops.
I've got something working along these lines ( for ASSIGN(=), EQ(==) -
its reasonably straight forward to add others ((non)nil coalesce QUESTION(?) and BANG(!) and straight math ops.
With just the first two its not too onerous since mostly its natural to space wrap these anyway (except (for me at least) if they are enclosed in parentheses )
Interestingly with only those two implemented the compiler build gives 230 failures and the test suite has 213 failures ( tho most of those are wrt EQ).
I'll cleanup the code to a patch and drop it on that ticket for anyone elses experimentation/investigation..
Other langs use ?. and it fits with the nilability association ( nilTyping and nil-coalesce using ?)
I've made ticket:341 as a placeholder for enhancement of requiring spaces around binary ops.
I've got something working along these lines ( for ASSIGN(=), EQ(==) -
its reasonably straight forward to add others ((non)nil coalesce QUESTION(?) and BANG(!) and straight math ops.
With just the first two its not too onerous since mostly its natural to space wrap these anyway (except (for me at least) if they are enclosed in parentheses )
Interestingly with only those two implemented the compiler build gives 230 failures and the test suite has 213 failures ( tho most of those are wrt EQ).
I'll cleanup the code to a patch and drop it on that ticket for anyone elses experimentation/investigation..