Feature request: function prototypes

Russell Lewis webmaster at villagersonline.com
Fri Feb 8 08:31:17 PST 2008


Robert Fraser wrote:
> This may seem like a pretty stupid request, but since I use a lot of 
> version() statements in my code; it'd be really cool to have something 
> like function signatures at the top of my file. When I declare my 
> versioned functions, I'd love to be able to have them checked against 
> prototypes declared above their use, as a first line of defense (so I 
> don't need to r-test it on different OSes and libraries if I make an 
> obvious change to one of the signatures or something).

This sounds to me like a pretty compelling argument for function prototypes.

An ugly but workable solution to this would be static asserts which 
verified the type of each function.



More information about the Digitalmars-d mailing list