Neat 0.4.0: Let's try something else
FeepingCreature
released this
07 Oct 16:21
·
184 commits
to master
since this release
Introducing breakelse
!
If inside an if
block, breakelse
will jump to the else
block.
If there is no else
block, it will jump to the end of the if
.
?
has been expanded: if the expression type contains an :else
, it will cause a breakelse
. This is a shortcut for .case(:else: breakelse)
.
The .else(X)
expression will directly replace the :else
case with X. This is a shortcut for .case(:else: X)
.
The idea is to augment error handling with something like null
: a type that represents "the operation failed, but in a normal way."