Hey list,<br><br>As an C/Obj-C developer, I've often thought that it would be useful to be able to do this:<br><br>    NSString *username = NSUserName();<br>    uid_t userID = 5;<br>    NSLog(@"Hello, " __nsfmt__(username) @"! This is your user id: " __nsfmt__(userID), username, userID);<br>

<br>I imagine __nsfmt__ would work similarly to __typeof__, but rather than substituting the type, the compiler would substitute the most natural printf format specifier for the given type. There would also be a standard-C __fmt__ that would generate constant C-strings rather than constant NSStrings. Is there any reason this doesn't already exist? (Or perhaps I've overlooked it if it does?)<br>

<br>Not having any experience with compiler implementation, I was hoping someone could give me a few pointers before I try implementing such a feature?<br><br>Thanks!<br><br>David