[Haskell-cafe] Learning C after Haskell
greg at sleepingsquirrel.org
Mon Jun 12 16:13:02 EDT 2006
Chad Scherrer wrote:
> My question is, as I learn C, are there any particular Haskell concepts I
> should keep in the back of my mind, or is it better to approach C from
One thing from Haskell I'd try keep in mind is to minimize side
effects and keep the scope of side effects as contained and local as
possible. So avoid mutating global variables, try not to write to the
same file from multiple different subroutines, etc.
And if you start getting seg-faults, you'll probably want a tool to
help you, since reasoning and debug by printf on pointers can only take
you so far in a language like C.
More information about the Haskell-Cafe