3 ms·
> That's maybe 1% of functional programming, if that. I was asking where I can find the other 99%. > And from how you write about it, it seems like you haven'
by csense 13y ago
> That's maybe 1% of functional programming, if that.
I was asking where I can find the other 99%.
> And from how you write about it, it seems like you haven't even tried to dabble with that
Yes, I have. I use functools.partial all the time, and I've written programs that use function pointers in C before. I'm just trying to figure out whether "functional programming" means "passing functions around functions as objects and the sorts of hacks you can do with args/kwargs in Python," or if there's something more than that. For all the replies I've gotten in this thread, the best answer I've gotten is "it's all of the above plus immutable state."
- coldtea 13y ago>Yes, I have. I use functools.partial all the time Well, "I read the docs" doesn't convey that. And "partial" is just, well, a very small part of it. >and I've written programs that use function pointers in C before. I'm just trying to figure out whether "functional programming" means "passing functions around functions as objects and the sorts of hacks you can do with args/kwargs in Python," or if there's something more than that. For all the replies I've gotten in this thread, the best answer I've gotten is "it's all of the above plus immutable state." Only very superficially. Passing function pointers in C is just dipping your toes in functional programming -- if that. Let's say that those are the tip of the iceberg -- and that the whole idea lies in the interplay of functional concepts (much further than what people usually do in C, unless they implement their own ad-hoc Lisp in it). It seems like what you picked as "the best answer" from this thread is the one that reinforced a preconceived opinion, without having to actually try programming in a functional language. How about this reply you got above: "Lastly, some tone stuff: Function pointers have nothing to do with functional programming." -- and others like it.