home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / misc / 2874 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  4.1 KB

  1. Path: sparky!uunet!mcsun!uknet!mucs!m1!bevan
  2. From: bevan@cs.man.ac.uk (Stephen J Bevan)
  3. Newsgroups: comp.lang.misc
  4. Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
  5. Message-ID: <BEVAN.92Sep1165817@tiger.cs.man.ac.uk>
  6. Date: 1 Sep 92 15:58:16 GMT
  7. References: <17mcr4INN4qq@network.ucsd.edu> <BttB9z.IAy@mentor.cc.purdue.edu>
  8.     <BEVAN.92Aug31101447@tiger.cs.man.ac.uk>
  9.     <BtwIqK.78M@mentor.cc.purdue.edu>
  10. Sender: news@cs.man.ac.uk
  11. Organization: Department of Computer Science, University of Manchester
  12. Lines: 69
  13. In-reply-to: hrubin@pop.stat.purdue.edu's message of 1 Sep 92 13:27:54 GMT
  14.  
  15. In article <BtwIqK.78M@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  16.  
  17.    The name of a variable is purely arbitrary, and any other string of
  18.    symbols recognized as one is just as good.  But an operator is a
  19.    constant, and cannot just be renamed.
  20.  
  21. I have a different view of operators.  To me they are just symbols
  22. which I can alter at will as long I as know the underlying meaning of
  23. the operator i.e. at one level it doesn't matter to me whether I write
  24. "2 + 2" or "(plus 2 2)", they both imply addition.  Of course this
  25. leads to "how do you know it is addition?" ...
  26.  
  27.    Now one can attempt to define an operator in terms of "system primitives,"
  28.  
  29. You certainly can, but why would you want to bother?  I'm not saying
  30. you can't have the semantics, I'm just saying you might not be able to
  31. have the syntax you want.  You can currently write "2 + 2" in most
  32. languages but you certainly can't put an integral sign in your code.
  33. Do you view these things as different in some way?  I don't, to me "+"
  34. is just a shorthand for "plus".  In the case of an integral sign,
  35. there is no shorthand, you just have to use "integrate".
  36.  
  37.  
  38.    Do we not have overloaded operators now?
  39.  
  40. Yes, but is that anything to be proud of?  I'm personally still
  41. ambivalent towards operator overloading.  Most languages that
  42. currently allow operator overloading only do so in a fixed manner.  My
  43. guess is that this is because allowing user defined operator
  44. overloading requires more powerful type systems than you seen in the
  45. vast majority of languages.  The only language that I'm aware of that
  46. makes any progress in this respect is Haskell.  Its type system is
  47. powerful enough to allow the definition of a certain class of user
  48. defined operators e.g. it can easily cope with overloading +, -, * ...
  49. etc.  However, you cannot currently parameterise over an
  50. implementation so you can use the same notation for indexing dense and
  51. sparse matrices (work is being done on this though).
  52.  
  53.  
  54.    The CS people should not be telling users that the hardware/software
  55.    combination is "smart."  Rather, they should emphasize that it is very
  56.    unintelligent, but very fast--a super-fast sub-imbecile.
  57.  
  58. Are you sure you're not taking them out of context?  Some software can
  59. be "smart" in a certain sense.  For example, a compiler can employ all
  60. sorts of optimisation techniques that altough I may know I may miss in
  61. a certain section of code.  Now the compiler isn't smart, it is just
  62. very quickly applying lots of rules that some "smart" compiler writer
  63. put into it.  So depending on how you look at it the compiler is
  64. either "smart" in the sense that it can outdo the average programmer
  65. or it is "dumb" in the sense that it can only use the rules it has
  66. been given.  I think both views are equally valid depending on the
  67. context and how much you attatch the the semantics of "smart" and
  68. "dumb".  Anyway, if you don't think you are taking "CS people" out of
  69. context, then name names or give quotes so this "CS person" can judge
  70. for himself. 
  71.  
  72.  
  73.    computer, there would have to be very careful translations.  These
  74.    could be local or global; the .h files are such, and are in common
  75.    use now.  But they, and the current methods of incorporating
  76.    user-defined macros, are inadequate.
  77.  
  78. What "current methods"?  I realise that there are some primitive macro
  79. processors out there (e.g. cpp for C), but there are better ones.  I
  80. personally think the Scheme macro system is better than most and would
  81. be interested to hear if/why you think it is inadequate.
  82.  
  83. bevan
  84.