Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hooks and callbacks

Name: Anonymous 2011-01-14 10:33

Ive read definitions of both of these and I just dont have a clear idea of what they are. What I think they are is:

hook: replacing an interface function with your own function to change the functionality of an interface

callback: putting a function call inside a function call so when you call a function it calls your function that you gave it

is this right?

Name: Anonymous 2011-01-14 10:57

depends on context, eg in some VCS hooks are scripts that are ran pre/post commit.

callback is usually when you're dealing with async programming: you request for some operation that takes time to take place and supply a function that should eventually be called with the result.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List