[Haskell-beginners] Lazy vs Strict ponderings...

sean at objitsu.com sean at objitsu.com
Sun Mar 20 09:09:04 CET 2011

>> 2) Don't worry about memory leaks until they actually appear. If they
>> do, use a profiling tool to find out what's going on. Most likely, one
>> of the two things above happened in an interesting way.

At the risk of sounding stupid in Haskell mode, how would I be aware  
of this other than obvious messages or seg-faults about memory getting  
low ?

> It is likely that, if you develop a medium to large sized application for
> a customer, memory leaks will appear at the customers site. It will often
> be very difficult to reproduce the situation and find the leak.

That scares me enough to not want to use Haskell for serious  
application development. With 26 years in the trade I have had too  
many times when a fault cannot be reproduced and despite an 'obvious  
fault in the source' being fixed and the problem never coming back,  
without being able to reproduce and thus confirm that you have  
eliminated the problem, you can't ever relax on a Saturday night! LOL

I hate the word 'random' when clients describe problems too!

> If you
> want to produce quality software, it is best to be sure what you are doing
> during the whole development process. There should be a set of guidelines,
> on how to prevent space leaks.

I guess "being sure..." comes with experience of the language, like  
any other. I can 'think' in quite a few languages with complete  
confidence, knowing that things will just work. I guess Haskell is a  
bigger elephant sandwich! There is something beautiful about its  
syntax and the fact that everything is (or can be) so precise and  
concise, sometimes a little too concise for me to read. It *makes* me  
want to be in that club just so I can have that level of understaning  
about my job.

I learned BASIC and UCSD-PASCAL at age 11 and I have never stopped  
being fascinated about *what* computing is all about. Sometimes I  
think that a CPU *is* a perfectly enlightened consciousness always in  
the *now*.

Time for my medication and music therapy.....

> See also "On the reliability of programs",
> http://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EWD303.html

Will do, thanks.


More information about the Beginners mailing list