Back to the issue... (was RE: Squeak coding style...)

goran.krampe at bluefish.se goran.krampe at bluefish.se
Fri Mar 5 08:17:02 UTC 2004


"Lex Spoon" <lex at cc.gatech.edu> wrote:
> John Pfersich <jp1660 at att.net> wrote:
> > I not only think that it's not only not pointless to try, but that 
> > it's necessary to succeed.  And I can't see why any package  that 
> > will be included in the base can't conform to the standards.
> 
> We first need to determine what the standards, if any, should be.  I
> dearly want any such standard to only be adopted if we are convinced it
> will improve things.  The class comments rule has such an argument, but
> most of the other proposed rules do not.  If we adopt rules just to have
> consistency, then we are just tying our own hands.
> 
> General judgement and taste can go a long way without needing any rules.
>  We do not necessarily need to have a list of rules to follow.  It is
> sufficient to have people with good taste guarding the entry.
> 
> 
> On the flip side, bad code cannot be made good just by forcing it into
> some conventions.   Do we want to have to accept code just because it
> follows some list of rules?  I don't think so -- we should also require
> that the most important packages have a certain level of functionality
> and quality, for example.  There is no safety to be found in lists of
> rules; poor authors will always find a new abheration to circumvent
> them.  :)

Personal reflection:
I find it interesting that so many - at least considering the vocal
people - are so negative about trying to establish small little rules.
We do it all the time! The mistake I did this time was obviously to
*ask* about it. ;)

I also find it interesting that even when there obviously are a lot of
people in this community that thinks we need better documentation (this
is proven beyond doubt) including me, there also seem to be people who
thinks things are just fine as they are! Are all the rest of us
screaming for better documentation simply wrong? I think not.

That is at least how it is perceived by me, please correct me.

> Okay, that's my general philosophy.  On the specific issue of coding
> conventions, I get the impression that we are getting along fine without
> them,

The "getting along fine" argument can be thrown at any proposal of
improvement.

> so I'd tend to hope we just leave things the way we are.

Seems in general to be a rather conservative view - I wonder what your
thoughts are on Traits for example?
Also see above.

> Maybe
> I'm mistaken, but from reading this thread I've not heard of people
> having particular problems reading Squeak code, especially since they
> can fall back on the pretty printer when necessary.  However, if I'm
> wrong, and people are having trouble, then indeed let's adopt some
> conventions to help out.  I just want to see some expected benefit from
> it.
> 
> The rules I *really* think we should have are general and high level. 
> For example, we might say "packages should be documented well enough
> that most people who know the domain can figure out how to use the
> package."  

Not sure why you would want to have the restriction "who know the
domain".
Of course we don't need to push entire books of knowledge into class
comments, on the other hand I think good documented packages tend to be
understandable and usable even if I don't understand the domain
particularly well. And to at least get some hints on what the stuff is
and what it is used for seems to be common decency to me.

In general I think we just have to agree to disagree here - you
obviously follow the tradition that comments are something that in an
ideal world shouldn't even be there. I on the other hand like to have
nice, readable comments that explain what the heck code does - even if
the code is beautiful in itself. One reason is that I like to be able to
use objects without having to learn their code. And I don't want to
force people into reading my code just to be able to use my objects.

Sure, Smalltalk is quite readable on its own if it is properly written -
but I can't see the "harm" that you tend to see with comments. Again, we
are talking about the *standard packages* here.

But I have seen these discussions before - it is different philosophies
at play. The question is - what philosophy should Squeak strive for? The
"leave it as it is" doesn't do it for me, especially not trying to be a
Guide.

> -Lex

regards, Göran



More information about the Squeak-dev mailing list