Arc Forumnew | comments | leaders | submit | dark's commentslogin
1 point by dark 6145 days ago | link | parent | on: Suggestion: constructors

Yeah! I was going to suggest exactly this. I program daily in OCaml and I find extremely useful this way of pattern matching.

I would also suggest a way of doing static typing in parts of the code. I will explain: ML pattern matching usually leads to situations when all cases are covered, and there is no margin for error. that is, if I have a way to specify that ifhave receives only (have x) or (none) for some x, there is no way to reach the error condition

-----