What would happen if you specify a conditionless condition-list? A compiler error?
To oversimplify things, treat regular
let
andvar
s as non-conditionals.
By regular do you mean non-optional?
TBH I don't like this proposal since I feel like it can only make things harder to read. I've long since started to use ,
as a synonym for &&
in these places, and I don't think I am alone. It also feels like it could be easy to accidentally hide a condition among a list of non-conditions e.g.
if condition1,
var someVariable = ...,
callSideEffect(on: &someVariable),
condition2, // HIDDEN
callSideEffect(),
{ ... }
EDIT: I suppose my example is functionally different than what you posted because of short-circuiting, which makes me understand your comparison to result-builders a bit better.