THE MEANING OF LAZINESS

I have always maintained that it is a good thing for a programmer to be lazy. No offense is intended with this statement. The assumption is that a programmer does her job, whether she’s lazy or not. Only when she’s lazy, she’ll spend time thinking about the work she does. She recognizes that there are elements that simply require time to get right, which can’t be helped. There are elements that are fun and others that aren’t, but all of them need to be completed.

And there are elements that are boring because they are repetitive, and that can be helped by finding out what these elements are exactly, and how they can be done more efficiently. It is frustrating to do something more than once, and being lazy makes a programmer want to figure out how to avoid such situations. There are also things that are done, and then something changes and you find you didn’t really have to spend all that time doing those things because the results are no longer needed. For many programmers, this feeling of having wasted time is something they want to avoid at all cost. They are certainly not always successful, but the attitude is a healthy one for a programmer.

Laziness (well, within the terms described here) makes a programmer write better programs. Perhaps surprisingly, computer languages employ laziness themselves to prevent doing things that aren’t really required at a particular point in time.

Chapter 9 contains a lot of information on execution strategies, and how ...

Get Functional Programming in C#: Classic Programming Techniques for Modern Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.