Named parameters in variants


#1

I working on a parser for math expressions and I’d like to differentiate implicit vs. explicit multiplication. I have variant Mul(bool). Right now I have to remember that the bool means implicit. Is there anyway to have a variant where the parameter is named, e.g. Mul(~implicit:bool)?


#2

Don’t use a bool.

Mul([ | `Implicit | `Explicit])


#3

@Khady this is awesome, thanks!