Is there anything *enjoyable* about our development process?

Stuart D. Gathman stuart at bmsi.com
Sun Oct 16 18:02:11 EDT 2005


On Sun, 16 Oct 2005, Thomas Bushnell BSG wrote:

> "Stuart D. Gathman" <stuart at bmsi.com> writes:
> 
> > Python (LISP semantics, modern syntax), or Ruby (Smalltalk semantics,
> > modern syntax) would be good choices.  
> 
> You really think a white-space-dependent language is a "modern
> syntax"?

Short answer: depends on what you mean by "whitespace"

Long answer: Ruby uses braces like C.  As for Python, you're thinking of (old)
Fortran, and RPG, where you had to put things into magic columns on your punch
cards.  Apparently, you haven't seriously looked at Python - which is
"indent" dependent, not white space dependent.  You can do whatever
floats your boat with whitespace, using as much or as little as you
want.  The only requirement is that inner blocks are indented more than
outer blocks - just as any sane programmer does in other languages
with braces/BEGIN/END whatever.  "Indent" and "Outdent" are tokens in the
language with a function similar to braces.

With the C approach, you run your code through a "beautifier" (or you should)
which uses the braces to make sure that it indents things consistently - so
that you don't get confused by incorrect indentation when reading the code.
With Python, the compiler looks at the indent, just like your eye does.
I've actually had experienced C/Java programmers ask me how Python
knows where blocks begin/end.  I tell them, "It's magic.  Just write
the code like you would in C, but leave out the braces.  It just knows."
And sure enough, it just knows.  :-)

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.



More information about the gnucash-devel mailing list