Content deleted Content added
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 232:
"Callback" - is noob term in [[computer programming]] into [[Abstraction (computer science)|abstraction layer]], implying supposedly a [[Function (computer programming)|function]] that sended as a parameter to another function and may be called by it. Although in fact it is not the function itself that is transferred, but only its address of ___location in memory (pointer), as a rule, this is 32-bit or 64-bit address. Calling a function means going to this address, as a rule, using the assembler command call and returning after performing all operations using the assembler command ret. Thus, this term misleads programmers, since the actual transfer of the code itself does not occur, but the transfer of the address occurs, and the call itself is not reverse, but direct.
:I find what you're writing difficult to follow, and I think it is too implementation specific, but I do agree that the opening sentence is confusing and needs to be changed.
:It says: ''a callback is a function that is stored as data (a reference) and designed to be called by another function – often back to the original abstraction layer.'' I have two objections to this:
:First, "a function that is stored as data (a reference)" is nonsense. Either you pass a function itself, or you pass a reference to the function; both are possible, but they are not the same thing.
:Second, what is this "original abstraction layer" doing there? Callbacks are simply a mechanism; they may or may not be used to create an abstraction layer of some kind, but no such layer needs to exist for a callback to be created.
:This is much like starting an article on ''Apple'' with the sentence: ''an apple is a fruit that is stored as organic matter (a word) and designed to be eaten by man - notably, in the creation of original sin''. No, sir or madam, either you pass an apple or you pass the word "apple", but they are not the same thing; and while passing an apple was part of the creation of original sin, apples exist completely separately from it and there is no need to mention it in the first sentence on apples. [[User:Rp|Rp]] ([[User talk:Rp|talk]]) 20:49, 16 September 2024 (UTC)
|