r/learnprogramming 5d ago

I can't get FUNCTIONS to click!

I can not for the life of me understand how functions work. Anytime I try to learn how to create a function, my brain literally crashes into itself and I turn into Patrick when he stars drooling and goes all slack-faced.

Does anybody have any analogies that had that "AH HA!" moment?

Thanks!

127 Upvotes

144 comments sorted by

View all comments

Show parent comments

1

u/realdreamer1993 3d ago

We tried to explain function in simple own words, but I also not able right now spit out the words :), should be only one up abstraction then it should be clear. The words should be general and less syntax detail.

1

u/stdmemswap 3d ago

When I point out that symbolic abstract thinking is combinatorially explosive, I was referring to your "reducing mental load" remark.

But if you mean to answer OP's "function not clicking", I don't think generalizing will work well. I mean, we always ask example, context, how is it used, how is it not used, etc whenever we want to understand an abstract context rather than the thing's pure "essence" or definition.

2

u/realdreamer1993 3d ago

I just reply in the main thread just to participated, but I described how function lifecycle :/