2 ms·
Left and Right are really commonly used in this situation in ML-descended languages. It’s not the worst thing. I don’t mind car and cdr though. I kind of wish
by currymj 9y ago
Left and Right are really commonly used in this situation in ML-descended languages. It’s not the worst thing.
I don’t mind car and cdr though. I kind of wish they were in Clojure tbh. It feels nice to pay tribute to a half-century of computing history.
- kbp 9y ago> Left and Right are really commonly used in this situation in ML-descended languages. It’s not the worst thing. Are you talking about Either types? OCaml and Haskell at least both call car and cdr fst and snd respectively, but they're rarely used. As for left and right as names, I don't think they're any worse than car and cdr, I just don't think they're substantially better.