Handling MATCH and "Falsey" Types

...aaaand...with Flexible Logic.... Now We Don't Have To Worry About FALSE (or NO, or OFF) Either!

We're down to just one "branch inhibitor": The ~null~ antiform (and maaaaybe ~NaN~)

So it seems the options are:

  1. Don't worry about it. If you write match [logic?] 1 = 2 you get back a ~null~ antiform and should you write an expression like if (match [logic?] 1 = 2) [print "Match!] you get what you deserve.

  2. Error on it, e.g. match [null?] null panics.

  3. Have a MATCH:RELAX variant. Let plain match on null trigger an error and if you write if match:relax ... then you clearly know what you're doing, so it becomes like case (1).

2 Likes