From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: "Nick Roberts" Subject: Re: Real-time dyn allctn (was: Ada vs C++ vs Java) Date: 1999/01/26 Message-ID: <78lv2n$dpl$2@plug.news.pipex.net>#1/1 X-Deja-AN: 437354882 References: <369C1F31.AE5AF7EF@concentric.net> <369DDDC3.FDE09999@sea.ericsson.se> <369e309a.32671759@news.demon.co.uk> <77mu1h$n6m$1@galaxy.mchh.siemens.de> <77no7p$d65$1@nnrp1.dejanews.com> <78i6m3$505$4@plug.news.pipex.net> <78im07$86a$1@nnrp1.dejanews.com> X-Mimeole: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-01-26T00:00:00+00:00 List-Id: I suppose it depends on how hard is 'hard', but I think the answer is 'yes'. For example, a certain well-known brand of laser printers implements a stack-based PDL, and it uses code, inside its ROM, which is effectively recursive, to interpret this PDL. Recent models of these (and other) printers also use a highly sophisticated system of dynamic memory allocation and management (including garbage collection and data compression). Another example: a certain military mapping program uses an reverse Polish coding to encode the map data. The code used to unravel and display this data uses recursive-descent. Of course, we could have used loops, but it would have been a minor nightmare to do so. The program worked just fine. Plainly, the use of recursive calls will be impossible (or at least foolhardy) for many applications, and for many others it will simply be unnecessary. But why forbid it? There will also be some applications where recursion is a pain to avoid, and many where such avoidance is not really necessary. ------------------------------------------- Nick Roberts ------------------------------------------- robert_dewar@my-dejanews.com wrote in message <78im07$86a$1@nnrp1.dejanews.com>... |Recursion in a hard real time program? You certainly work |in a different environment from what I am used to. I am |used to recursion being forbidden, as in OCCAM, precisely |to allow static analysis of maximum storage use.