OpIn
downs
default_357-line at yahoo.de
Tue Feb 5 04:52:07 PST 2008
dominik wrote:
> On Tue, 05 Feb 2008 13:23:24 +0100, downs wrote:
>> use is presumably a function that returns a temporary struct.
>>
>> The temporary struct defines opIn.
>>
>> The (GL gl) { } is a delegate literal that takes a GL parameter.
>>
>> So this code calls the temporary struct's opIn with a (void?)
>> delegate(GL).
>
> so basically all of this "in" and delegate literal is something like a
> fancy callback?
>
Basically, yes. :)
I love D, among other things, for its ability to easily declare and pass around small snippets of behavior, i.e. delegate literals :)
--downs
More information about the Digitalmars-d-learn
mailing list