Re: What is the purpose of static typing?
Re: What is the purpose of static typing?
- Subject: Re: What is the purpose of static typing?
- From: Marcel Weiher <email@hidden>
- Date: Thu, 25 Jul 2002 09:53:40 +0200
No. The code for dealing with return types is at the call-site, the
object has no control over it. It also has no actual knowledge of it,
because the selector it gets passed doesn't contain any
type-information, at least not in Apple's Objective-C.
On Thursday, July 25, 2002, at 05:31 Uhr, email@hidden wrote:
The object can always use introspection to choose the right method
though (this doesn't really correspond with your example).
On Wednesday, July 24, 2002, at 08:36 PM, Ondra Cada wrote:
That said, static types are indeed almost superfluous from the
functionality point of view. The only situation when they can't be
replaced by ids without any problems are -- slightly incorrect, but
possible -- messages with same name, but different signatures, like
@interface Foo
-(int)blah;
@end
@interface Bar
-(double)blah;
@end
Now, [(Foo*)x blah] and [(Bar*)x blah] are compiled differently.
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
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.