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

  1. Path: sparky!uunet!wupost!waikato.ac.nz!bwc
  2. From: bwc@waikato.ac.nz (Ug!)
  3. Newsgroups: comp.sys.acorn.tech
  4. Subject: Re: New Language/Compiler (ideas wanted)
  5. Message-ID: <1992Aug19.173612.10221@waikato.ac.nz>
  6. Date: 19 Aug 92 17:36:12 +1200
  7. References: <1195@grun.is> <1992Aug17.132929.10141@waikato.ac.nz> <KERS.92Aug17083517@cdollin.hpl.hp.com> <1992Aug18.114418.10160@waikato.a <KERS.92Aug18090246@cdollin.hpl.hp.com>
  8. Organization: Vooniersity fo Kaiwato
  9. Lines: 141
  10.  
  11. Chris Dollin writes:
  12. >Ug! writes [responding to me]:
  13. >    Beware: Lisp is essentially an interpreter, even when it's compiled.
  14. > Would you like to explain the grounds on which you base this claim? [What do
  15. > you mean by ``essentially'' and ``interpreter''?]
  16.  
  17. Not really - I think you know what I mean.  I qualify Lisp as an interpreter,
  18. since much lisp code actually writes lisp programs which are then executed at
  19. some stage.  I also qualify Smalltalk as an interpreter though, so maybe I'm
  20. wrong.
  21.  
  22. >    > Lisp. Scheme. Poplog Pop11. Smalltalk. Don't forget ratios and complexes.
  23. >    Oh I know.  But ratios and complexes can be added where needed.  They 
  24. >    shouldn't be a 'standard part' of the language.  
  25. > I think the standard library *is* part of the language, and I'd rather have
  26. > ratios and complexes than not.
  27.  
  28. Ah, right!  In which case, by all means!  I try to distinguish between
  29. languages which are operator & type rich, and languages which are library
  30. rich.  Oberon is a classic example.  A minimalist language with a huge set
  31. of libraries.  Smalltalk is another good example.  However, if you view the
  32. standard libraries of a language as part of the language itself, then by all
  33. means add all of these things.
  34.  
  35. I was objecting to them being added as base types and so forth.  The Modula-2
  36. ISO workgroup added COMPLEX as a base type, which I think is rediculous!
  37.  
  38. > I suggested user-defined operators. Ug! said:
  39. >    Hmm.  Perhaps.  The problem then is that you have to pake allowances for
  40. >    all symbols and symbol combinations in the parser.  Tricky.  I'd go for
  41. >    simplicity, and just allow the built in operators to be overloaded.
  42. > Tricky? *Tricky*? TRICKY?
  43. > ``Trivial'' is the word I'd use. Lexical analysers clump up letters into
  44. > identifiers all the time; what's to stop them clumping up sign characters into
  45. > operator names? There is *no* problem here, despite what C++ language
  46. > designers may have tried to tell you. [They're stuck with supporting the
  47. > lexis of C, and wimped out on requiring whitespace for utterances such as
  48. > ``x+++y''.]
  49.  
  50. Read what I said again.  Was I talking about lexical analysis?  No.  I was
  51. talking about parsing.  Perhaps you feel user defined operators are trivial
  52. to parse; I don't agree.
  53.  
  54. > I said:
  55. >    > Lists. Sets. Hash tables (both content and address based).
  56. > Ug! said:
  57. >    Exactly.  All of these are implementable though.  
  58. > [Presumably he means on top of the language.] Yes, but see my remarks above
  59. > about the library. Hash tables (especially address-based ones) are possibly
  60. > the single most useful data structures ever invented.
  61.  
  62. By all means.  All of these (and more) should be in the libraries.
  63.  
  64. > I said:
  65. >    I'd vote *against* abstract data types and for a simple but powerful module
  66. >    structure...
  67. > Ug! said:
  68. >    The reason is reuseability.  You can fudge it by returning some sort of
  69. >    'handle' (usually an index into a list), but if you are going to return a 
  70. >    handle, why not return the object itself?  Yes,  OO gets around it.  I'm 
  71. >    not a fan of OO though.
  72. > I'd put the object in the heap and return its address -- a perfectly good
  73. > handle for the object. I suspect we're at cross-purposes here; what do ADTs
  74. > gain you in reusability that module scoping does not?
  75.  
  76. When you have to pass back some sort of handle to the user of a module: not
  77. internally to a module.  Like C's and Basic's file handles, for example.
  78.  
  79. > Ug! responds to my ``GARBAGE COLLECTION'':
  80. >    Ooo.  Garbage Collection.  Nice.  Still, a big hit in speed/performace,
  81. >    etc.  See Modula-3 (also has freely available ftp'able descriptions).
  82. > What big hit did you have in mind?
  83.  
  84. Garbage collection is fine, but it really does need hardware to support it.
  85. There has been a lot of work done on stopping the 'sudden hit' (i.e. the
  86. machine freezes while garbage collection takes place), which early versions
  87. of Lisp and Smalltalk suffered from.  Most of them however now require a
  88. steady percentage of the processors time in which to perform garbage
  89. collection.  Without hardware, this can be quite noticeable, especially as
  90. memory fills.  (from experience with Smalltalk)
  91.  
  92. >    For simplicities sake, however, I am often willing to forgo it.  But is is
  93. >    definately a nice idea.
  94. > For simplicitys sake, I'd put it in. I've written too much C, and handled my
  95. > own store allocation too often, to want to force the poor programmer to do it
  96. > themselves. 
  97.  
  98. Oh come on!  This is probably the first time this guy has implemented a
  99. programming language and you want him to put in grabage collection?!!!  Be
  100. reasonable!  Better to implement a language without garbage collection than
  101. get bogged down and not manage to implement it at all!
  102.  
  103. >    Modula-2 fundges a solution with local modules.  But in the case where
  104. >    A & B share X.  B & C share Y.
  105. >    ...ouch.  But it happens (all to commonly).  Some sort of explicit 
  106. >    inheritance control in this case would be nice.
  107. > What does it buy you? Use modules and put up with the fact that B can see X.
  108. > If necessary have the compiler tell you. The idea is nice, but in practice
  109. > it's just make-work for the programmer.
  110.  
  111. Data hiding gains you quite a bit.  Read some stuff on software engineering.
  112. Essentially its a quality assurance measure.
  113.  
  114. > Other things:
  115. >    initialised declarations;
  116.  
  117. Yes!  Good point!  I'd go one step further: typable constants, not just for
  118. initialisation.  (constant arrays and records are *so* useful in Modula-2)
  119.  
  120. > unassignable names (``constants'');
  121.  
  122. Yes.  Constants please!
  123.  
  124. > incremental compilation;
  125.  
  126. Maybe.
  127.  
  128. > first-class procedures; first-class everything; full lexical scoping.
  129.  
  130. Can you explain these a little more?  I'm not that familiar with Common Lisp
  131. or Scheme, I'm afraid.
  132.                             Ug!
  133.