You should use if-then-else.

The fact that "6.6.3 of the spec

[link:research.microsoft.com]

says that if-then-else has equivalent semantics to a pattern match" ought not be construed as a reason to not use if-then-else.

By on 3/20/2009 2:41 PM ()

I'm not sure why it's "really lame" -- you didn't want to use the value, so you didn't use it...

Anyways, I'd write it like this, if I had to use a match.

let a = match (b < c) with true -> x | _ -> y

But if/then/else works fine and is arguably more clear.

By on 3/20/2009 2:41 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper