Human Factors in Programming Languages

Take a look at Quicksort implementations in Erlang

qsort1([]) ->
[];
qsort1([H | T]) ->
qsort1([ X || X <- T, X < H ]) ++ [H] ++ qsort1([ X || X <- T, X >= H ]).

and in Haskell


qsort1 [] = []
qsort1 (p:xs) = qsort1 lesser ++ [p] ++ qsort1 greater
where
lesser = [ y | y <- xs, y < p ]
greater = [ y | y <- xs, y >= p ]

Haskell syntax is much nicer to look at – a important quality of a good language. Many programming languages didn’t pay enough attention to human factors issues. In other words, we need more social scientists involved in designing the next big thing.

Leave a Reply