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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!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: <1992Aug18.114418.10160@waikato.ac.nz>
  6. Date: 18 Aug 92 11:44:18 +1200
  7. References: <1195@grun.is> <1992Aug17.132929.10141@waikato.ac.nz> <KERS.92Aug17083517@cdollin.hpl.hp.com>
  8. Organization: Vooniersity fo Kaiwato
  9. Lines: 114
  10.  
  11. Chris Dollin writes:
  12. >Ug! writes:
  13. > |    Firstly, have a look at Oberon-2.  The descriptions are available 
  14. > |    by anonymous ftp from ETH.  Some really neat ideas there.
  15. > Make sure you've looked hard at Lisp, Scheme, and Pop11 too. The pure
  16. > functional languages are also a good source of ideas.
  17.  
  18. Mmm.  Yes.  However, Oberon, in all of its implementations is a strictly
  19. minimalist language, which is why I suggested it.  In that sense, Lisp would
  20. probably be good alos, but I've no doubt that he's already considered this.
  21. Someone else mentioned an idea of every statement returning a value: this is
  22. very much in keeping with the ideas behind functional languages.
  23.  
  24. Beware: Lisp is essentially an interpreter, even when it's compiled.
  25.  
  26. > | Generics. Any new language worth its salt should consider this
  27. > | issue.
  28. > C++ *has* generics, although they call them ``templates''...
  29.  
  30. Yes, well...
  31.  
  32. > | Subranges.  At some stage I'd love to build a language which has
  33. > | *no* concept of fixed data-type sizes...
  34. > Lisp. Scheme. Poplog Pop11. Smalltalk. Don't forget ratios and complexes.
  35.  
  36. Oh I know.  But ratios and complexes can be added where needed.  They shouldn't
  37. be a 'standard part' of the language.  (I suppose Smalltalk is okay, since
  38. *everyting* is part of the sort of library).  I'm a great fan of procedural
  39. languages though - not one for functional or object-oriented stuff.  The
  40. suggestion was in the same way that Ada copes, rather than Lisp/Smalltalk.
  41.  
  42. > | Overloading.
  43. > Common Lisp + CLOS has this. If you want to do it properly, allow
  44. > user-definable operator *symbols*, don't restrict them to built-in operators
  45. > (both Ada and C++ have this totally unnecessary restriction).
  46.  
  47. Hmm.  Perhaps.  The problem then is that you have to pake allowances for all
  48. symbols and symbol combinations in the parser.  Tricky.  I'd go for simplicity,
  49. and just allow the built in operators to be overloaded.
  50.  
  51. > | One of the things I would like is a 'string' concept, which
  52. > | automatically handles groups (arrays) of items which grow and
  53. > | shrink - maybe a 'bag'.
  54. > Lists. Sets. Hash tables (both content and address based).
  55.  
  56. Exactly.  All of these are implementable though.  So is the 'string' concept I
  57. mentioned for that matter, but the minute you put one in, the others all
  58. become simple to implement using it.  I suggested the 'string' once, since of
  59. course, strings of characters are oh-so-common.
  60.  
  61. > | No limitations like 'strings can only be up to 255 in length'.
  62. > | Yuck!
  63. > The restriction I have in mind for my language Pepper is that no object can
  64. > have a length bigger than that which will fit in a fixnum (an immediate-value
  65. > integer), which limits them to 2^29 elements. This limits bit arrays to 64Mb.
  66. > Fortunately this restriction seems unlikely to bite for a few years yet.
  67.  
  68. Hmm.  Why 2^29?  Shouldn't it be 2^31?  Anyway, both are reasonable approxi-
  69. mations of infinity at the moment.
  70.  
  71. > | Can link up with C, including C I/O.
  72. > Yes, cross-calling in some manner is essential. What's more difficult -- but
  73. > necessary in the long run -- is to give C some way of calling *your* routines.
  74.  
  75. Yes.  I think that the Acorn language Kernel idea should help somewhat in this
  76. though.
  77.  
  78. > | A good 'ABSTRACT' (or opaque) data type.
  79. > I'd vote *against* abstract data types and *for* a simple but powerful module
  80. > structure. After all, all ADTs do is to restrict the names that the user is
  81. > allowed access to -- they're not allowed to use the representational names,
  82. > eg, the fields of a structure; rather, they have access via a set of
  83. > procedures. But this is just what modules are for, so why conflate the two
  84. > concepts? [C++ does this with classes, and look at the resulting mess.]
  85.  
  86. The reason is reuseability.  You can fudge it by returning some sort of 'handle'
  87. (usually an index into a list), but if you are going to return a handle, why
  88. not return the object itself?  Yes,  OO gets around it.  I'm not a fan of OO
  89. though.
  90.  
  91. > Have we said ``Garbage collection'' yet? Have garbage collection. Have Garbage
  92. > Collection. HAVE GARBAGE COLLECTION.
  93.  
  94. Ooo.  Garbage Collection.  Nice.  Still, a big hit in speed/performace, etc.
  95. See Modula-3 (also has freely available ftp'able descriptions).
  96.  
  97. For simplicities sake, however, I am often willing to forgo it.  But is is
  98. definately a nice idea.
  99.  
  100. An idea I didn't mention before: one of the things I dislike is implicit
  101. inheritance in procedural programming languages (i.e. global or semi-global
  102. variables).  If you want two routines to share access to a variable, then
  103. both should have to explicitly inherit it: it shouldn't be made global (ala C).
  104.  
  105. Modula-2 fundges a solution with local modules.  But in the case where
  106.  
  107. A & B share X.  B & C share Y.
  108.  
  109. ...ouch.  But it happens (all to commonly).  Some sort of explicit inheritance
  110. control in this case would be nice.
  111.  
  112. A possibility is to look at what Modula-3 does with it's multiple definitions
  113. for a single module.
  114.  
  115. Have fun!
  116.                             Ug!
  117.