Article View: comp.sys.transputer
Article #1742occam and recursion and out-of-memory problems
From: Oyvind Teig
Date: Mon, 23 Nov 1992 10:23
Date: Mon, 23 Nov 1992 10:23
41 lines
2168 bytes
2168 bytes
Recursion of occam-2 or -3
Rob Kurver writes as a reply to my post:
>>I have seen enough of stack overflow errors to appreciate the lack
-------------------->>
>>of recursion in occam.
>
>Recursion + stack-checking -> no stack overflow.
>
>>This comes close to the discussion of exception-handling: how do
>>you solve that in Pact-C, and what would you recommend when stack overflow
>>is encountered?
>
>Upon stack overflow, the stack is extended by allocating a new block of
>memory from the heap. If this is not possible (out of memory), you get
>a fatal error message and your program aborts.
>>---------------
Ok, you have an interesting solution there, of course you do not remove
the out of memory error (which is what I was thinking about).
Occam does NOT have out-of-memory errors!
-----------------------------------------
Why couldn't you buy the occam sources from Inmos and add your own
experience and make an occam dialect (that allows recursion etc.) ?
After all - occam has not been standardized.
Sure occam isn't C, but C isn't occam either! And you may have adopted
a few of the good things from occam into your C - but you have not made
occam out of it. After all, the security of occam could be
a point to sell?? The lack of pointers, the abbreviations, the retyping,
the othogonality of functions and procedures, the aliasing checks,
the indenting (yes), the protocol with its associated checks, the no-out-
of-memory insurance and least but not last - IT IS MUCH EASIER THAN C.
It is probably too easy for C programmers - who actually would like to
have structured assembler!
But YOU could add your own compiler directives to squeeze it a little!
0yvind Teig
Autronica, Trondheim, Norway
Technical Details
Message-ID:
<143@autro1.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!autro1!teigShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!autro1!teig From: teig@autro1.UUCP (Oyvind Teig) Newsgroups: comp.sys.transputer Subject: occam and recursion and out-of-memory problems Message-ID: <143@autro1.UUCP> Date: 23 Nov 92 10:23:27 GMT Reply-To: teig@autro1.UUCP (Oyvind Teig) Organization: Autronica A/S, Trondheim, Norway Lines: 41