Is there anything *enjoyable* about our development process?

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


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

> You mean that I can take Python programs and add newlines between any
> two tokens, and things will work?  No extra tabs or spaces needed?
> Really? 

You can add escaped newlines between any two tokens.  You can
add unescaped newlines between any two tokens within a 
'{}' (generators), '[]' (list comprehension), or '()' block.

So, while you can't put your entire program on one line, you
can make one line per token.

> Are you telling me that the ++indent operation is not context
> dependent?  There is no hidden state inside that there function?

Outputing indent spaces in front of each line is implied.
Or, you could output some non-python token and post process (beautify).

> It sounds as if you are deliberately trying not to see my point.

You seem to have a completely different goal in mind.

Python syntax is designed for *human* consumption.  If you are trying
to optimize machine comprehension, I would suggest machine code.
Or for cross platform capability, byte code.  Forth is probably the
best cross platform machine optimized language that is still comprehensible
by humans.  I would not at all object to Forth as an extension language,
having done some work in Postscript.  It is also "context free" and
snippets can be pasted anywhere and just work.  In fact, each token
is just a short hand for pasting a sequence of tokens, each of which
is a short hand for pasting a sequence of tokens ... and eventually
some of the tokens are implemented in machine code.

However, the purpose of the scripting language is to provide a high level way
for *humans* to extend the system.  Since the core of the system is in C, 
your code generators would be much better off targetting C code.
The C code will be much faster, and your generator won't have to
worry about making it readable for humans.

> Recognizing the importance of context-free grammars was a tremendous
> advance in programming language linguistics.  

It was a great advance for machine readable grammars.  Humans like context.
If Human readability is of only secondary importance, then Forth like
languages are *very* machine readable.  However, the scripting language
for gnucash should in my opinion make *human* readability the 
primary goal.  It is wonderful that LISP code is so easily generated
*and* executed by machines, and yet is still comprehensible by humans.  
That makes it an ideal primary language for systems with lots of self
modifying code - and an ideal intermediate language for a compiler.

In my opinion, the kind of programming to be done via the gnucash
extension language doesn't fit that profile.

-- 
	      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