I'm not at all sure it's the right approach, but assuming it is, I suppose a special function or operator that extracts an exception result object could do. E.g.
exceptionset(m)->no_value ? "bar" : m->foo
That concentrates the exception magic into an ordinary function, and uses the plain "?" operator for the actual selection.
/ Leif Stensson, Lysator
Previous text:
2003-01-23 18:18: Subject: Re: zero_type() & UNDEFINED and _typeof()
Any better suggestions for some exception-conditional that can be used as an expression?
/ Niels Möller ()