MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2012

Re: Callback



fixed

John

As I wrote my reply, I was thinking about whether we can specify the address of a procedure in another service program, say. I didn't bring it up, because I wasn't sure, and I thought it'd confuse the issue. Generalizing to that would have benefits similar to what we espouse already for service programs.

I'll still go with the callback term - I could even say that the called party is calling back to someone known to the calling party. It does seem to get a bit precious, however, and the traditional understanding works for me, although I hear what you are saying.

Vern

On 10/15/2012 5:33 PM, John Yeung wrote:
On Mon, Oct 15, 2012 at 5:46 PM, Vernon Hamberg
<vhamberg@xxxxxxxxxxxxxxx> wrote:
The easiest example I use - the almost-only-one, actually, is when I use
the qsort API - when you call qsort, you tell it what data is to be
sorted, how long each element is, and a pointer to a procedure that will
compare 2 elements and return either that they are the same or that one
or the other is larger. That procedure is the callback - maybe we can
think of it as a CALL BACK to the caller of qsort. qsort walks through
the elements and passes pairs of them to the callback procedure.
I have never really liked the explanation that the called function is
"calling back" to the original caller. Yes, that's where the term
came from, but I don't think it emphasizes the right things.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact