Re:OCaml at First Glance
by Athas on Monday August 29, 2022 @10:17AM
(#32638561)
I never understood the motivation for allowing tuples without surrounding parens. There are a few very simple functions that look cuter this way, but it constantly trips me up in more complex situations.
[ Parent
| on HN ]
Re:OCaml at First Glance
by a-nikolaev on Monday August 29, 2022 @12:04PM
(#32639829)
No parentheses can be nice for cleaner pattern matching, e.g. something like this:
match a, b with
| 1, 2 -> x
| _ -> y