home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / transput / 1225 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.0 KB  |  56 lines

  1. Newsgroups: comp.sys.transputer
  2. Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!nuntius
  3. From: Marco Kesseler <marcok@cs.kun.nl>
  4. Subject: Re: IS Occam3 recursive?
  5. Message-ID: <BxyLs4.Hn5@sci.kun.nl>
  6. Sender: news@sci.kun.nl (NUnet News Owner)
  7. Organization: University of Nijmegen
  8. X-Useragent: Nuntius v1.1
  9. References: <1992Nov17.093335.11067@inmos.co.uk>
  10.      <Bxuxz5.F0E@cs.bham.ac.uk> <1992Nov18.130407.12799@titan.inmos.co.uk>
  11.      <rob.722124411@dutncp8>
  12. Date: Thu, 19 Nov 1992 10:43:15 GMT
  13. Lines: 41
  14.  
  15. In article <1992Nov18.130407.12799@titan.inmos.co.uk> Stephen Doyle,
  16. steved@lion.inmos.co.uk writes:
  17. >I guess the 
  18. >difference boils down to whether you want an ANSI C validated compiler
  19. with 
  20. >functional additions for parallelism and communications or an ANSI C
  21. compiler 
  22. >with non-ANSI language additions for the same. I would argue (from
  23. customer 
  24. >feedback) that OCCAM tends to be used along with INMOS ANSI C as this 
  25. >provides you with a flexible environment for parallel/comms/sequential 
  26. >programming with excellent diagnostics at compile and run time.
  27. >
  28. >Just to cloud the issue once more INMOS' soon to be shipping new
  29. optimising C 
  30. >compiler has a specific optimisation for tail call recursion i.e.
  31. >
  32. >void p (int q)
  33. >{
  34. >  ...
  35. >  return(p(...));
  36. >}
  37. >
  38. >in this case the workspace of p is reused as the function recurses,
  39. also, 
  40. >nested returns are omitted so that only one return is needed no matter
  41. how many 
  42. >levels of recursion take place.
  43.  
  44. The compatibility issues mentioned above make me wonder if such
  45. an 'optimisation' is conform ANSI standards. Forgive me my ignorance,
  46. but would such a procedure work in any implementation of ANSI C?
  47. It guess this is a new feature of C. Perhaps a rather superfluous
  48. thing to do as well. C has loops.
  49.  
  50. By the way, we are implementing a lazy functional language (Concurrent
  51. Clean) on the transputer. The way to write loops in such a language is
  52. by means of recursion as depicted above (there is no other way). Needless
  53. to say that we have implemented this kind of 'optimisation'.
  54.  
  55. Marco
  56.