Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The Problem

Name: Fart Commander 2011-04-15 12:27

This is the prototype for the sprintf() function in MS Visual C.


#pragma warning(push)
#pragma warning(disable:4793)
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST(int, __RETURN_POLICY_SAME, _CRTIMP, sprintf, vsprintf, __out_z char, _Dest, __in_z __format_string const char *, _Format)
#pragma warning(pop)


If you ever catch yourself thinking "Hey, I could come up with a clever macro to do this repetitive work for me," you should ask yourself a couple of things before you start using it:
1) Does the macro improve readability?
2) Does the macro improve maintainability?

If the answer to either of those is "no," then just don't fucking do it.  No one is going to suck your dick for coming up with a macro that makes life difficult for everyone who uses your API.

Name: Anonymous 2011-04-15 13:02

>>4
Actually, "Fart Commander" is a /prog/ meme.  Perhaps it is you that doesn't "belong to /prog/."

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List