Should class comments be separated from source code?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Should class comments be separated from source code?

liang bing
Should class comments be separated from source code?

I think it should be separated into two files, the reasons are,

1. current comment not enough for understood (less or nothing)
2. if I added new comment , it is not convenient when update or load new packages
3. comment is knowledge about how to use, how to change the application, it could be shared and accumulated
4. comment should be stand alone as  knowledge base with different local languages


I hope Squeak 4.6 gives a new comment tool in system browser
Three files: Soure file, Changes and Comments file,

Hope Squeak better!

Liang Bing
I love Smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Should class comments be separated from source code?

timrowledge

On 22-03-2014, at 11:44 PM, liang bing <[hidden email]> wrote:

> Should class comments be separated from source code?

No. Well, probably not. Class comments are supposed to be a short but helpful guide to what the class is for. We have a number of problems with them but they’re all really to do with the lack of them or the outdatedness of them.
>
> 4. comment should be stand alone as  knowledge base with different local
> languages
Now that is actually a good point. I don’t think it would be solved by having a separate comments file though. Quite aside from anything else, where are we going to get the volunteers to write hundreds of class comments and then re-write them in various languages?

An option that would provide some capability for multiple languages would be to add a way to check on the web for a class comment that is more recent - or in a different language- and download it. A really simple fetch of a page from the swiki ought to be adequate, at least as a proof of concept. Or a ping to a Magma server?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Low on thinking gas.