Re: Need clarification on categories
Re: Need clarification on categories
- Subject: Re: Need clarification on categories
- From: Ondra Cada <email@hidden>
- Date: Tue, 19 Mar 2002 20:55:49 +0100
On Tuesday, March 19, 2002, at 06:44 , Chris Kane wrote:
Right. Casting, preprocessor, and extern object delarations aside,
headers are just for your conveniency, without them ALL WOULD WORK
PRECISELY THE SAME WAY.
Well, the CAPS is going too far.
As a matter of fact, I don't think so:
Except in cases where you thoroughly understand the default
typing/promotion rules of C, and the call is such that it will be still
OK under those rules, the compiler will not generate correct code at call
sites if it hasn't seen a prototype for a method (the same as for a C
function as well).
For example, consider
- (float)floatValue;
May I perhaps point out the "Casting, preprocessor, and extern object
declarations aside"?
So far as I know, those are the only situations when just outcommenting an
#import might bring problems:
- casting: you shown a nice example yourself;
- preprocessor: no need to give an example, I hope!
- extern object declarations: if external objects (from classes to an
"extern int foobar") are not known, compiler would issue an error.
Possibly I have forgot another thing, but frankly, I don't see any: do you?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.