• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Think Python: Is functional programming covered in your book?

 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I like python due to its capability to support both functional programming and OO. I didn't find any chapter in your book covers functional programming.
 
Author
Posts: 28
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main thread through Think Python is from procedural programming to object-oriented programming, so I don't do a lot of functional programming.

I cover a few topics that fall under the general heading of functional programming: there are some examples that pass functions in as parameters, and lots of recursion. I present map, filter and reduce patterns, but we do it using for loops (for good reason, I think, but the style is not as functional as it could be).

Beginners often struggle with recursion, so I present it early (before iteration!) and often.

But I don't present recursive data structures in this book, and I don't think I use lambda to create anonymous functions.

So, no, functional programming is not a focus.

Allen

 
Oh sure, it's a tiny ad, but under the right circumstances, it gets bigger.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic