Tuesday, November 21, 2006

Some things that make haskell code easier to read...


You may create a say a tuple such as (Int, String)
and make a comment for the tuple that says
-- tuple (Int, String) is (count, macroname)
so you have a more descriptive name for the
simple types that you are using.

Also, for function names I find the hungarian notation
simplifies things a lot. If you have a function that converts
a list of ints to hexadecimal strings for example you might
put...

hexlistfromintlist::[Int]->[String]