D is awesome, my situation, questions

BCS BCS_member at pathlink.com
Sat Jun 3 18:30:15 PDT 2006


In article <e5tact$2htp$1 at digitaldaemon.com>, mike.benfield at gmail.com says...
>
>Anyway, I've played with D for a couple hours, and it's awesome, 


Welcome. Glad you like it.


>Can someone explain to me the difference between delegates and functions?
>

The difference is most notable with delegates and function _pointers_. The
difference is that a function pointer is just like in C but a delegate caries a
bit more context with it. 

In the simple case a delegate is formed from an object and method. Then without
the object reference, some other code can call the given method with the given
object. 

In the more complex case, the context that is carried along is something else,
often another function's local variables. In this case, rather than put an
object pointer in the delegate, the other functions stack pointer is used.

In any case, the code that uses the delegate doesn't need to know what the
context is and as a result the varius types are interchangeable.


>Any chance of D getting an incremental garbage collector? 
>

That is one of a lot of peoples pet peeves. So, sooner or later, but don't hold
your breath

>Are there any contingency plans for D if Walter gets abducted by Martians or
>decides to abandon language design and compiler implementation and take up 
>knitting instead? I'm a little scared of the prospect of using tools that 
>depend almost entirely on a single wizard.

Ah... Not that I known of. Anyone have a spare UFO D-fence system laying around?

In the more complex case, the context that is carried along is something else,
often another function's local variables. In this case, rather than put an
object pointer in the delegate, the other functions stack pointer is used.

In any case, the code that uses the delegate doesn't need to know what the
context is and as a result the varius types are interchangeable.


That is one of a lot of peoples pet peeves. So, sooner or later, but don't hold
your breath


Ah... Not that I known of. Anyone have a spare UFO D-fence system laying around?

But seriously, there are several projects (GDC  et.al.), not run by Walter, that
have working D compilers that could be maintained without him.





More information about the Digitalmars-d mailing list