STR-198: Concrete syntax for optional match and build
It would be useful to support concrete syntax for optional matches and builds. The optional match should perform a match of Some() and result in an unbound variable if there is None(). The build should try to build a Some() or create None() if that fails.
The contribution of this feature is that you don’t need to write separate rules for both cases. This is especially frustrating if there are several optional constructs in a single syntactical construct (e.g. a for loop). It’s tempting to fall back to abstract syntax in these cases.
This should be easy to implement. It probably introduces a special AST construct, similar to FromTerm, ToTerm and meta-var.
Submitted on 31 October 2004 at 19:15