1) A native not operator that can be prepended to any bool expression.
if not contains() { ... }
Simple ! is so unmarkable and not noticable when reading. But using false == ...() is ugly
2) defer like in golang. And option to defer a loop, not only a function. So action to be executed right after break (not just return)
3) a crazy idea but I'm always thinking about having a break-from-if operator. When you have compex if-logic, this option allows to make it easy, more flattened and therefore more readable
1) A native
not
operator that can be prepended to any bool expression.Simple
!
is so unmarkable and not noticable when reading. But usingfalse == ...()
is ugly2)
defer
like in golang. And option to defer a loop, not only a function. So action to be executed right after break (not just return)3) a crazy idea but I'm always thinking about having a
break-from-if
operator. When you have compex if-logic, this option allows to make it easy, more flattened and therefore more readableLiterally today I tried to break from an
if
in Java and got a compiler error. It would be a super useful addition.