Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

14. Ramping Lisp Up a Notch with Functio... > Why Functional Programming Is Fantas...

Why Functional Programming Is Fantastic

Now that I’ve told you about all the headaches a functional programmer must endure, you may be wondering, “Why would anyone bother to program this way?” The answer is that functional programming has many enticing benefits that make up for these headaches.

Functional Programming Reduces Bugs

Bugs in computer programs usually happen because, under certain circumstances, the code behaves in ways the programmer didn’t expect when the code was written. In functional programming, the behavior of your functions depends on one and only one thing: the arguments explicitly passed into the function. This makes it much easier for a programmer to appreciate all the circumstances a program could possibly encounter, including circumstances that could lead to errors.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint