Re: Cocoa and dead-code stripping
Re: Cocoa and dead-code stripping
- Subject: Re: Cocoa and dead-code stripping
- From: Thomas Engelmeier <email@hidden>
- Date: Tue, 3 Jul 2007 13:46:08 +0200
Am 02.07.2007 um 22:34 schrieb Andrew Demkin:
Sorry to be the contrarian voice here, but dead-code stripping is
certainly possible for languages like Objective-C. It's one thing
to say it's not supported, or of lesser utility, but technically,
it is possible.
The way this would work is to have the development tools scan all
message selector references (and class literal references) and
strip all methods and classes that aren't referenced. This process
would repeat until the tool can no longer perform any more
stripping. There have been dynamic language implementations that
behaved this way over 10+ years ago.
And now you pass one of your objects holding an NSArray of other
objects e.g. as parameter to NSNotificationCenter.
How is the linker supposed to know that no framework goes to inspect
e.g. the passed parameter via object:forKey: and plays around with
the result? Or that you don't use e.g. F-Script to dynamically access
the code? Or some plug-in acesses "unused" selectors?
Regards,
Tom_E
_______________________________________________
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