Feature request: function prototypes
Christopher Wright
dhasenan at gmail.com
Fri Feb 8 06:34:51 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).
Have a unittest? To satisfy your purposes, it just needs to call each
function, even with invalid input. Then if everything compiles with
-unittest, you're golden, even if that crashes.
Satisfies your requirements, anyway, and in any situation, you'd be
duplicating the signature three times.
More information about the Digitalmars-d
mailing list