D - Functions and Delegates
- Marcelo Fontenele S Santos (25/25) Feb 05 2003 Just my 2 cents.
- Walter (1/1) Feb 09 2003 I intend to revisit this issue, as many have requested this. -Walter
Just my 2 cents. I think that function pointers and delegates should be interchangeble and use the same syntax. int function( int ) foo; int bar( int i ) { } foo = bar; // ok function address class O { static int bar( int i ) { } int baz( int i ) { } } O o = new O; foo = O.bar; // ok function address foo = O.baz; // error no object pointer foo = o.baz; // ok encapsulates object pointer and method adress This would make this a lot easier to understand and to implement signal/slot functionality in the language or in a library. -- Marcelo Fontenele S Santos <msantos pobox.com>
Feb 05 2003
I intend to revisit this issue, as many have requested this. -Walter
Feb 09 2003