Reputation: 903
Which keyword / tag should we use to describe them when we're taking notes for them.
If they are placed under the category "software design", is it appropriate?
@edit: It's more about how you category things. When you are in learning, some terminology appears, so what category will you assign it in your own ontology?
Upvotes: 1
Views: 178
Reputation: 1
I consider "Closures" and "Callbacks" related but nowhere equivalent. The lowest common denominator between the two I would say are "Higher-Order Functions", which take place in "Functional Programming".
http://en.wikipedia.org/wiki/Higher_order_functions
http://en.wikipedia.org/wiki/Functional_programming
Upvotes: 0
Reputation: 98846
Right, I suspect I’m going to reveal my stupidity here, but anyway:
Hopefully defining them will help you classify them — I don’t think the terms “callback” and “closure” actually mean the same thing, although they can both refer to the same thing depending on context.
I’ve made this answer community wiki, so please feel free to edit it until it’s correct.
http://en.wikipedia.org/wiki/Callback_(computer_science)
a callback is executable code that is passed as an argument to other code
http://en.wikipedia.org/wiki/Closure_(computer_science)
The term closure is often mistakenly used to mean anonymous function. This is probably because most languages implementing anonymous functions allow them to form closures and programmers are usually introduced to both concepts at the same time. These are, however, distinct concepts
Upvotes: 2
Reputation: 7214
I think Function Pointer can be used as tag for "callback" or "closures".
Upvotes: 0