Regarding this subject I think:
- There's impossible to authoritatively classify anything as
"dead code" unless there's a reference standard of what's core
and what's not core (like, Java defines the JFCs). At this point
it would be useful to have a reference standard of "core
classes" and their "core messages/methods".
- Having a reference model, it would be nice to have a way
preventing modifications of core classes inside official
distribution. Meaning: to be considered part of an official
pharo distribution, code must not alter foundation classes. That
shouldn't be an issue due to huge support for inheritance
provided by smalltalk. So, if need arises to have, let's say, a
new message/method inside something like Array or
OrderedCollection or whathever, it's easy to do that simply
creating MyNewLittleOrderedCollection... It's not hard to verify
integrity of core classes using digital signatures.
- There should be an official policy for marking code as
"obsolete" or "deprecated".
I guess that once a model of reference classes is established, it's
easier to start profiling things and finding what's alive and what's
dead (not used anymore inside an official distribution). It also
prevents the uncontrolled growth of "core stuff" as consequence of
ad-hoc solutions.
A plus advantage of defining a set of core classes is that it makes
easy to fully document and analyze them. It allows to ensure
several things that are required for any system to be used in the
development of serious commercial software:
- Profiling (theoretical/measured): known algorithms
- Security
- Regarding continuous operation and up time
- Regarding "civilized" use of resources (memory, IO)
- Regarding integrity of data
- Regarding misuse & unforeseen uses of
classes/messages/resources
- Regarding privacy
- etc...
- It makes it possible to have serious end user documentation,
clearly specifying functionality, interfaces, cases of use,
limits, error conditions, etc. (side comment: it never went into
my mind de discourse of "documentation is the code" (moreover
when some code is not easily understandable)).
My 2¢
CdAB