Obviously pattern matching must be one of the main features of Ikigai. For the beginning I was thinking to take advantage of the fact that switch cases in JS accept any expression to easily implement a limited pattern matching for unions. But maybe it's better to start directly with a full-powered pattern matching. This is not trivial, but we may be able to recycle some code from the F# compiler.
Obviously pattern matching must be one of the main features of Ikigai. For the beginning I was thinking to take advantage of the fact that switch
case
s in JS accept any expression to easily implement a limited pattern matching for unions. But maybe it's better to start directly with a full-powered pattern matching. This is not trivial, but we may be able to recycle some code from the F# compiler.