2009/3/4 7stud
<bbxx789_05ss@yahoo.com>
Here are my top three:
...
3) Not putting parentheses around arguments of the form x:xs
dosomething x:xs = head xs
I have a variation here:
function [] = ...
function [x:xs] = ...
Another of mine is the classical:
print function arguments -- or variations
but I finally learned to use '$' here .
In all three cases, the error messages don't help spot the problem.
I think that part of the problem is that haskell syntax is powerful but terse, and therefore is not easy for a compiler to guess the intensions in the programmers.
For instance, in any other language the expression 'map f' would give the error "missing second parameter", while in haskell could be a partial function application.
However, some of ghc messages could probably be made more 'beginners-friendly'.