home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / transput / 909 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.5 KB  |  60 lines

  1. Newsgroups: comp.sys.transputer
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!torn!csd.unb.ca!k3mi
  3. From: k3mi@jupiter.sun.csd.unb.ca (Brian d'Auriol)
  4. Subject: Re: occam
  5. Message-ID: <1992Aug12.133216.23941@jupiter.sun.csd.unb.ca>
  6. Organization: University of New Brunswick
  7. References: <2490@news.cerf.net>
  8. Date: Wed, 12 Aug 1992 13:32:16 GMT
  9. Lines: 49
  10.  
  11. In article <2490@news.cerf.net> jcbhrb@nic.cerf.net (Jacob Hirbawi) writes:
  12. >(3) Is it really elegant to write this:
  13. >
  14. >     IF
  15. >       var1 < 1.0 (REAL32)
  16. >         SEQ
  17. >           var1 := 2.0 (REAL32)
  18. >           var2 := 2.0 (REAL32)
  19. >       TRUE
  20. >         SKIP
  21. >
  22. >     instead of  If( var1 < 1.0 ) Seq{var1 = 2.0;var2 = 2.0;}
  23. >
  24. >Don't get me wrong; Occam has many innovative features; it just seems to
  25. >me that a more sophisticated parser for the syntax would have gone a long
  26. >way towards making it more popular -- and a long way towards keeping
  27. >irritable people like me quieter ;-) .
  28. >     
  29.  
  30. Ok, but I would ***MUCH*** rather the first syntax for a folding editor.
  31. see below....
  32.  
  33.      IF
  34.        var1 < 1.0 (REAL32)
  35.          ...  process XYZ
  36.        TRUE
  37.          SKIP
  38.  
  39.      ...  an if with no idea of *structure*
  40.  
  41. In general the IF follows the syntax of a tagged protocol.  In both cases,
  42. the following is very easy to read.
  43.  
  44.      IF
  45.        condition 1
  46.          ...  proc 1
  47.        condition 2
  48.          ...  proc 2
  49.        condition n
  50.          ...  proc n
  51.        guard
  52.          ...  proc guard
  53.  
  54.  
  55. In short, I wonder if the extended syntax of Occam (esp. not free formatted)
  56. assists in the coding with a folding editor.
  57. Brian d'Auriol
  58.  
  59.  
  60.