Function pointers/delegates default args were stealth removed?

Manu turkeyman at gmail.com
Sun Aug 26 15:26:40 PDT 2012


I just updated to 2.60 and found errors throughout my code where function
pointers default args no longer work.
*Every single project* I've written in D, 5 projects, don't work anymore,
including my projects at work.

I found this discussion: http://d.puremagic.com/issues/show_bug.cgi?id=3866
It seems the change was just decided and implemented with basically no
discussion or argument at all :/

My use cases are dynamic linkage, and cross-language integration.
I can't manually interact with DLL's containing API's that expect to have
default arguments if function pointers no longer support them.
Also when receiving foreign language function pointers, they frequently
need to have default args too.

I also integrate with many C style API's (rendering engines and the like),
which involve registration of various callbacks, and lots of those have
default args too.

I find this particularly surprising, since I recently motivated
implementation of new traits which could parse default args from parameter
lists, and use that to generation function pointers in templates which
auto-magically clone functions parameter lists verbatim, specifically
including the default args...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120827/edacfb77/attachment.html>


More information about the Digitalmars-d mailing list