Class comments!?

Darius squeakuser at inglang.com
Thu Oct 14 19:02:55 UTC 2004


Tim,

> it is extremely rare that this is a complete
> explanation of what the code is _supposed_ to do

> Longer methods have exponentially more need for
> commentary explaining the intent, known limitations,
> unfinished parts etc.

This touches one of my pet concepts as alluded to by Charles Simonyi -
"Intentional Programming"
http://www.intentsoft.com/faq

Shouldn't such intents & limits be code as well? SUnit test /kind of/ describe
these intents & limits, but do they explain why one algorithm is used over
another?

In reality, shouldn't those concepts that you put into "comments" be sort-able,
searchable, rank-able, organize-able, watch-able, profile-able, aggregate-able,
traceable, expire-able, shareable, inheritable, etc. just as Squeak's code is?

Something like SUnit tests for creation/change of code to fit within shared
"intents" and "concepts" and not just unit tests for the objects' functions &
memory use that are created by the code. Not just for labeling the code as
"failed", but also the encouraging of what is considered "right" for
programmers writing within the domain of the concepts they're coding.

How would you search for an instance of the use of a "Pattern" in the code? All
the info is there in the code, just scattered among classes and woven in the
statements within the methods.

Cheers,
Darius




More information about the Squeak-dev mailing list