1

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?

developer.cyrus
  • 903
  • 2
  • 7
  • 18
  • 2
    Your question is unclear to me. What exactly do you want? – Padmarag Feb 23 '10 at 09:51
  • Just write it and publish it. Show the text to people, measure traffic, optimize for your target audience. – Tadeusz A. Kadłubowski Feb 23 '10 at 09:56
  • @Padmarag: 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? – developer.cyrus Feb 23 '10 at 10:01
  • 1. “callback” and “closure” mean different things. 2. “software design” seems like an incredibly general category — could you give an example of something that *wouldn’t* be appropriately categorised by “software design”? – Paul D. Waite Feb 23 '10 at 11:38
  • We have no way to read your future blog entry, so we don't know which term is an appropriate tag for it. – Tadeusz A. Kadłubowski Feb 23 '10 at 12:07
  • In terms of tagging things, why not simply tag your a question that involves a callback or a closure as you see fit. The community will correct it if necessary. The beauty of SO. Not sure I'd be too concerned about it an post a question about which is sort of meta in nature. – Peter Meyer Feb 24 '10 at 04:38

3 Answers3

2

Right, I suspect I’m going to reveal my stupidity here, but anyway:

  • “callback”: a function (A) passed to another function (B), that’ll be called in B to do work.
  • “closure”: a function that captures the value of variables from the scope in which it was defined

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.

callback

closure

  • 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

Community
  • 1
  • 1
Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
  • -1 The question was not what these terms mean but what keywords to use for them. – Tomas Feb 23 '10 at 10:36
  • 1
    Right, but if you don’t know what they mean, how do you know what keywords to use for them? The question seemed to suggest that they were synonymous, and they’re not. – Paul D. Waite Feb 23 '10 at 10:42
0

I think Function Pointer can be used as tag for "callback" or "closures".

Padmarag
  • 7,067
  • 1
  • 25
  • 29
0

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

Thomas Eding
  • 35,312
  • 13
  • 75
  • 106