[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: self-organization




	From trost%reed.BITNET@Forsythe.stanford.edu Fri Oct 26 14:22:52 1990
	Return-Path: <trost%reed.BITNET@Forsythe.stanford.edu>
	Date: Fri, 26 Oct 90 14:21:51 PDT
	To: self-interest@self.stanford.edu
	Subject: self-organization

	Is there any style-guide for Self, and has anyone organized alternate
	styles?  For instance, why do we put spaces between our parentheses
	and our vertical bars?  What are good tabbing conventions?  If I write
	a package to answer my mail for me, where in the (Self) world do I put
	it?

	Obviously, some of these ideas probably deserve experimentation, but
	maybe some of them have already been sort of worked out.


Interesting! I'm afraid there is no written style guide, but there is the body
of code to serve as examples. I put spaces in to avoid confusion when using small fonts
( (| can be hard to see ).
Tabbing: we use four character indents (assuming 8--character tab stops)
as a compromize between density and legibility.
We generally put the closing bracket ("]" or "| )") at the same indent as the opening
line, but put the closing paren of a method at the end of a line, to draw attension
to the value returned by the method. We generally put the opening bracket or paren
on the same line, rather than starting a new line because our taste runs towards
density, I suppose.
I guess all the superficial style issues seem completely subjective and a matter of
artistic taste to me. But I would prefer a world in which I could read other's code
without have to reindent it first.


If you write a new application, you might put it's traits in the traits applications
object, same for its prototypes and oddballs. Or, if there are prototypes or
traits that no one will ever need to reuse, you can put them in more obscure places.


Anyway, those are my thoughts, given that half of my brain is still in another country.

What do others think?

David