Newbie initial comments on D language - delegate

Joel C. Salomon joelcsalomon at gmail.com
Wed Jan 30 08:48:16 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Janice Caron wrote:
> On Jan 30, 2008 11:17 AM, Don Clugston <dac at nospam.com.au> wrote:
>>>>     extern(C) void (*callback)(int,int);
>> That's just 'function', using the hideous C syntax.
> 
> Yes, that is precisely my suggestion. I see that as an advantage, not
> a disadvantage, because it would encourage people to use "delegate",
> unless they absolutely couldn't.
<snip>
> On the other hand, if you want to interface with C, then you shouldn't
> be surprised if you have to use hideous C syntax.

I’d go a step further:  If you’re interfacing to a C function, you
presumably have its declaration handy -- in C syntax.  Why have a
keyword that’s only useful in the one circumstance where it’s not needed?

- --Joel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHoKpPzLx4GzBL9dYRArmAAKDP1DkAj5w6CAaoPHttIXaevdFLygCgkNF6
aSjVbilEUnDyoiSr4lbn6xw=
=yN2s
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list