Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: