home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / transput / 927 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  5.3 KB

  1. Path: sparky!uunet!mcsun!uknet!harrier.ukc.ac.uk!pine.ukc.ac.uk!arc1
  2. From: arc1@ukc.ac.uk (tony)
  3. Newsgroups: comp.sys.transputer
  4. Subject: Re: occam
  5. Message-ID: <46@pine.ukc.ac.uk>
  6. Date: 14 Aug 92 15:17:18 GMT
  7. References: <2490@news.cerf.net> <1462@eagle.ukc.ac.uk>
  8. Sender: arc1@ukc.ac.uk
  9. Organization: Computing Laboratory, UKC
  10. Lines: 131
  11.  
  12.  
  13. Warren> Column counting is, the formatting is done elegantly in occam.  One space is not
  14. Warren> enough indentation visually, three is too much when one has lots of indenting.
  15.  
  16. In your opinion that is - this smacks too much of Orwellian
  17. overtones to me.  Why not let the programmer choose?
  18.  
  19. Ok, it provides a standard layout, but open things up and
  20. let people decide over time what they want and they'll come
  21. up with a good working convention (or conventions) for
  22. layout.  I don't like having it enforced arbitrarily from
  23. on-high.
  24.  
  25. Warren> Formatting a program in this way is good as one uses spacial relationships to indicate
  26. Warren> the programs structure.
  27.  
  28. Not convinced.  Being forced into a particular layout
  29. doesn't, for me anyway, feel nice.  I'd like to learn what a
  30. good layout style is by getting it wrong, messy, learning
  31. from others etc.  It's a more constructive learning
  32. experience.
  33.  
  34. Warren> Formatting a language in this way is also good as one can use it to indicate
  35. Warren> information to the compiler
  36.  
  37. I thought the purpose of abstraction (v.i.) was to make life
  38. easier for the programmer, not for the compiler.  Write in
  39. binary/hex octal if this is what you are worried about.
  40.  
  41. Warren> , which cuts out the need of lots of end, od, esac, }
  42. Warren> and fi keywords.
  43.  
  44. But they do make block encapsulation easier to see on the
  45. screen.
  46.  
  47. Warren> My experience has lead me to do things like this,
  48.  
  49. Warren>   {{{ 1 + 2*3 - 4.0
  50. Warren>   ( 1.0(REAL32)  +  (2.0(REAL32) * 3.0(REAL32)))  -  4.0(REAL32)
  51. Warren>   }}}
  52.  
  53. I.e. your comment is syntactic rather than semantic and you
  54. are therefore repeating yourself, when you could have
  55. expressed the equation directly as per the comment in the
  56. first place.
  57.  
  58. Warren> By the way, the occam compiler (the one here at any
  59. Warren> rate) constant folds the above to 3.0(REAL32).
  60.  
  61. I suspect (hope?) any decent compiler for any language would
  62. try to do the same in this case.
  63.  
  64. Warren> Occam's approach to typing like this is hard on the fingers and brain sometimes, but
  65. Warren> it does make look at what you want the machine to do.
  66.  
  67. I'd rather worry about the problem I am trying to solve than
  68. worry about the machine.
  69.  
  70. Warren> No the above doesn't answer your point about the advantages, but others have,
  71. Warren> here I have decided giving out experience and ideas is more advantageous.
  72.  
  73. Warren>   IF
  74. Warren>     var1 < 1.0 (REAL32)
  75. Warren>       var1, var2 := 2.0(REAL32), 2.0(REAL32)
  76. Warren>     TRUE
  77. Warren>       SKIP
  78.  
  79. Except there is a bug in multiple assignments for the
  80. compiler we have here (TDS2, MEiKO) (or there was last time
  81. I looked at the bug list :-)
  82.  
  83. Warren> Perhaps the multiple assignment isn't more readable, I don't think my personnel taste
  84. Warren> prefers it, but its easier to type and were all lazy occasionally.
  85.  
  86. If your personal choice is offended, fine; this is the point
  87. about being able to choose layout etc.  Multiple assignment
  88. can be replaced by a SEQ of assignments; seems to me that
  89. Will's Razor hasn't been used here!
  90.  
  91. Warren> Jan's comment about wanting
  92.  
  93. Warren> TRUE
  94. Warren>   STOP
  95.  
  96. I think you meant SKIP
  97.  
  98. Warren> as the default is a common one.  I wanted it too until I was told why.  I think
  99. Warren> it was to catch and stop sloppy programming (not that any of us do that, all of
  100. Warren> our programs are bug free aren't they:-).  There might be a case the programmer
  101. Warren> has overlooked.
  102.   
  103. This would seem to indicate the programmer hasn't been
  104. thinking properly about the problem.  A warning from the
  105. compiler would be friendlier.
  106.  
  107. >My objection is why?. Who needs a new editor?; I mean just how many 
  108. >ways can you do a cut-and-paste operation!.
  109.  
  110. Warren> The important issue is that of abstraction.  Making a large thing managable by
  111.  
  112. But above you were worried about getting at the machine to
  113. optimise what you were doing, rather than making life easier
  114. for the programmer.  The current icarnation of the TDS and
  115. occam2 in no way make software management easier (and as you
  116. were talking about "experience", this is an opinion derived
  117. from 7 years' use of occam).  Don't get me wrong, I'm not
  118. stoning occam mercilessly, it's got a few good points, but I
  119. think it needs to go a long way to be "real" (or is that
  120. REAL32? :-)
  121.  
  122. Warren> humans.  Also as we get more experience at writing editors we get better at
  123. Warren> making the c-n-p operations easier to use and more intuitive to the first time
  124. Warren> user.
  125.  
  126. The TDS, so far as I can see, does not provide anything that
  127. any other editor can do, and lacks *much* thatcI get it in
  128. others (vi, emacs, etc).  As for folding making life easier,
  129. it is just as easy to abuse the fold structure as it is to
  130. write bulky code in any other editor.  It is also lacking
  131. SCCS type manipulation by using a closed system and a
  132. bizarre file format (binary source files?  I ask you...).
  133.  
  134. >I like to have more direct control over the files on my disk.
  135. Warren> Yes, it needs to be better at actually deleting files.
  136.  
  137. This is mainly an artefact of the MEiKO port to handle a
  138. multi-user system (I think).
  139.  
  140. Just my 2 groats worth...
  141.  
  142. tony
  143.