Re: Warning message using stringWithContentsOfFile:encoding:error:
Re: Warning message using stringWithContentsOfFile:encoding:error:
- Subject: Re: Warning message using stringWithContentsOfFile:encoding:error:
- From: Jens Alfke <email@hidden>
- Date: Sun, 28 Oct 2012 12:08:00 -0700
On Oct 28, 2012, at 11:03 AM, Quincey Morris <email@hidden> wrote:
> The thing that bothers me is why macros should be substituting into method parameter names at all.
The preprocessor barely knows anything about C syntax, let alone Obj-C. Remember, it’s running before the parser — all it gets is a stream of tokens. It just sees an identifier followed by a “:”, and there’s a macro defined for that identifier, so it substitutes it.
> 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.
“Nightmarish” is a pretty good description of the malign possibilities of the C preprocessor in general. :-P
—Jens
_______________________________________________
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