My favourite alternative of making a "crash safe version of !" (which is essentially what this pitch is about) is unchecked exceptions. Benefits:
-
as with
x^ alternativementioned above, it will support L-value expressions. This is in sharp contrast to anything discussed before in this of previous related pitches. -
compared to
x^mentioned above will not require a language / compiler change (only the standard library change). -
will require a minimal amount of source changes (textually it would still look like
x!just behave slightly differently if embedded withindynamicTry/catchbrackets directly or indirectly. Note that this is a strict opt-in (if you don't "activate" this feature by usingdynamicTry/catchthere won't be any behavioural changes). -
could be used for other things later on (array subscripts, etc)