Newsgroups: comp.sys.transputer
From: schedan@eskimo.com (Daniel Scheurell)
Subject: Re: SPOC - initiated questions about occam
Organization: Eskimo North (206) For-Ever
Date: 30 Apr 94 03:49:33 GMT
Message-ID: <Cp1zyM.9B3@eskimo.com>

Oyvind Teig (teig@autro1.UUCP) wrote:
: SPOC (Southampton Portable Occam Compiler)
: In the article about it, fetched from Hensa, in the abstract part it says:
: "..since occam supports many features that have no direct equivalent in C.
:  These features include concurrency, nested procedure definitions and a
:  static variable chain."
: Q1.  Nested procedure definitions.
:      Occam has it. C doesn't (?).
:      Pascal has it. Does C++?
A1. No, C does not support nested procedure definitions (all functions must
    be defined at the same, outermost, level).  C++?  I think maybe yes,
    though I'm not sure.
: Q2.  Is it "good programming" to use nested procedures in occam?
A2. Yes, I think so.  I believe that the transputer instruction set is 
    optimized for "locality of reference" (if that's the correct term for 
    it). So any routines and variables declared locally will execute and be
    accessed faster than otherwise.
: Q2b. In case used (in occam), should all parameters be parameterized?
:      (Readability, safety, movability in source)
A2b. Hmmm.  Sounds almost like a style issue.  And I don't believe in any
     one style.  The qualities you've parenthesized are good reasons to 
     choose whether or not to "parameterize".  The above statement concerning
     locality might point to performance reasons to parameterize.
: Q3.  Static variable chain. What is it?`Is it the prossibility to define
:      variables anywhere in code? C++ has it, doesn't it?
A3. Sorry, I don't know.

: 0yvind Teig Autronica Trondheim Norway

Hope this helps.
Dan

