What is a delegate?

I encoded some things on objetive c .. but I still don't understand, I don't know / understand what a delegate is.

Maybe because my main programming language is C ++ and Java ... I don’t know.

I searched on the Internet, looking for an explanation in English, but it seems I don't speak English :)

+3
source share
3 answers

A delegate is an instance of an object that implements a bunch of what C programmers call callbacks in an object-oriented way. Like most new concepts, this is really just an old convention, renamed and confused.

Wikipedia has some good examples.

+3

" ". C-, - .

, , , , . , "".

, . , , .

- , , - . , , - . ( ,

. , .

. , , , , ..

0

Source: https://habr.com/ru/post/1754822/


All Articles