I asked this morning what the heck was up with this post; now I see that the commentary is actually an old article (2001) from Dr. Dobbs:
Code reuse, the most common kind of reuse, refers to the reuse of source code within sections of an application and potentially across multiple applications. At its best, code reuse is accomplished by sharing common classes or collections of functions and procedures (this is possible in C++, but not in Smalltalk or Java). At its worst, code reuse is accomplished by copying and then modifying existing code. A sad reality of our industry is that code copying is often the only form of reuse practiced by developers.
A Smalltalk class can be thought of (never mind namespaces for the moment) as a global object. Therefore, any class method is - wait for it - a globally accessible "function".
We could also define a block and stuff that in a globally accessible variable, which would give Dr. Dobbs the same thing. Worse, this is Scott Ambler - who I would have assumed would know better.
Technorati Tags:
code_reuse