Re: Cocoa and dead-code stripping
Re: Cocoa and dead-code stripping
- Subject: Re: Cocoa and dead-code stripping
- From: Andre Schnoor <email@hidden>
- Date: Tue, 03 Jul 2007 15:21:42 +0200
Thomas Engelmeier wrote:
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.
Er ... 30+ years ago (Smalltalk)
While it is possible, unused code stripping has its weaknesses, like
others already pointed out. Unless Objective-C doesn't provide a means
for tagging individual methods as "used dynamically" (i.e. invoked
through some magic other than a direct call), automated stripping would
cause more damage than help.
Andre
_______________________________________________
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