[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cant' set PS1 after restart on Mac
From: |
John W. Eaton |
Subject: |
Re: cant' set PS1 after restart on Mac |
Date: |
Wed, 10 Oct 2007 13:17:31 -0400 |
On 10-Oct-2007, DushanM wrote:
| BTW, I always wondered why people often put a space between the function
| name and its arguments. I haven't noticed it making a difference.
I find that style easier to read because in written English the
convention is to use a space before an open paren and not after, and
to not use a space before a close paren. Similarly, commas are
followed by spaces. So it seems more natural to me to write
foo (x, y, z)
rather than
foo(x,y,z)
and certainly never
foo( x, y, z )
FWIW, I have always wondered why people who tend to use no spaces
before or after commas and parens in code often use tabs (expanding
to eight spaces) for indentation. Maybe it is just overcompensation
for the lack of whitespace elswhere? :-)
In any case, although this borders on religion, the conventions for
the code in Octave itself are to use something that is mostly like the
GNU coding standards. And we mostly try to stick to this standard not
because I'm a control freak, but because it makes the whole of the
Octave source code easier to read if it is written in a consistent
style.
One place we tend to deviate from the GNU standards is in the
formatting of variables with indexes, particularly in .m files, where
we usually omit the space between a variable name its index. Since
the syntax for indexing variables is the same as for calling
functions, I find that omitting the space for variable indexing to be
helpful as a small visual clue that the object is a variable and not a
function.
jwe