| I think this is partly because of the syntax. When we write human languages (that use a Latin script), we use punctuation to delineate the beginning and end of terms. In a language like C or Rust, terms are surrounded by commas, parentheses, angle brackets, and so on. In OCaml and Haskell, many things that there is syntax for in C-style languages are done as ordinary function calls, which separate terms by only whitespace. It is easier to read this (Rust): let value = some_long_ass_function_name(some_quirky_parameter, another_one);
another_function(value)
than this (Haskell): let value = someLongAssFunctionName someQuirkyParameter anotherOne
in anotherFunction value
or this (OCaml): let value = some_long_ass_function_name some_quirky_parameter another_one in
another_function value
Individual terms in camel case are difficult to read if they consist of more than a couple words. Consecutive terms in snake case are difficult to read because underscores and whitespace look alike visually.Haskell and OCaml's idiomatic solution is to use extremely terse names for arguments, type variables, and local variables, out of what seems to be syntactic necessity. |