Re: Warning message using stringWithContentsOfFile:encoding:error:
Re: Warning message using stringWithContentsOfFile:encoding:error:
- Subject: Re: Warning message using stringWithContentsOfFile:encoding:error:
- From: gweston <email@hidden>
- Date: Sun, 28 Oct 2012 19:09:33 +0000 (GMT)
Quincey Morris wrote
No matter what you do, file a bug with the 3rd-party framework. Their macros should not leak.
The thing that bothers me is why macros should be substituting into method parameter names at all. It potentially brings *pieces* of method names into the global symbol namespace -- which is basically what happened to Paul, if you look at his problem from the other end. That possibility seems nightmarish to me.
That's what macros do. C's #define mechanism is only slightly more than a 1:1 string replacement directive. If the #define X Y means that if the preprocessor sees X as a token it replaces it with Y. It has no concept of things like method or function names in the "real" language. It supports arguments in its own context, but that's about it.
One of the more amusing entries in the international obfuscated C contest many years ago was a source file consisting of a single letter. The rules were amended the next year to say that macros counted against the size restriction.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden