home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / acorn / tech / 52 < prev    next >
Encoding:
Internet Message Format  |  1992-08-16  |  3.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: <1992Aug17.132929.10141@waikato.ac.nz>
  6. Date: 17 Aug 92 13:29:29 +1200
  7. References: <1195@grun.is>
  8. Organization: Vooniersity fo Kaiwato
  9. Lines: 57
  10.  
  11. Halfdan Ingvarsson asks for ideas on new language features.
  12.  
  13. (deep breath)  Hokay, here we go:
  14.  
  15. Firstly, have a look at Oberon-2.  The descriptions are available by anonymous
  16. ftp from ETH.  Some really neat ideas there.
  17.  
  18. 1.  Generics.  Any new language worth its salt should consider this issue.  One
  19.     of the reasons why Ada beats C++ for productivity is that generics beats
  20.     object oriented for reuseability.  (the other reasons have to do with the
  21.     great tools that come with Ada, and the strict licensing scheme which
  22.     ensures compatability)
  23.  
  24. 2.  Subranges.  At some stage I'd love to build a language which has *no*
  25.     concept of fixed data-type sizes.  Of course, you could then have a
  26.     library routine which defines a type Word (much like Modula-2's
  27.     System.WORD) and Byte and so forth.  However, this is entirely a
  28.     portability concept, and so is not really applicable to what you are trying
  29.     to do, but even so, just think how nice it would be to be able to use
  30.     320-bit integers...
  31.  
  32. 3.  Overloading.  Ada has this, without being Object-oriented.  This coupled
  33.     with generics gives you better reuseability than object instantiation.
  34.     Both functional and operator please.  Don't worry about redefining
  35.     operator precedence:  leave 'em as they are, and folks can work with that.
  36.  
  37. 4.  One of the things I would like is a 'string' concept, which automatically
  38.     handles groups (arrays) of items which grow and shrink - maybe a 'bag'.  In
  39.     this way you could have a 'STRING OF CHARACTER' or a 'STRING OF INTEGER'.
  40.     'STRING', like 'ARRAY' allocates space, but it can be resized etc
  41.     dynamically.  Useful.
  42.  
  43. 5.  Projection.  See previously mentioned Oberon-2.  This completely redefines
  44.     the way inheritance and stuff works.  Keeps the language procedural rather
  45.     than data-driven, which is nice for those of us who think in processes, not
  46.     in data-flows.  Coupled with generics, should make life very interesting.
  47.     Also, by combining with overloading gives similar capability to object-
  48.     oriented, although dynamic binding might be tricky to fudge.
  49.  
  50. 6.  Packages or Modules or *something*!  Preferably coping automatically with
  51.     linking (C... yuck!).
  52.  
  53. 7.  No limitations like 'strings can only be up to 255 in length'.  Yuck!
  54.  
  55. 8.  There is no number 8.
  56.  
  57. 9.  Can link up with C, including C I/O.
  58.  
  59. 10. A good 'ABSTRACT' (or opaque) data type.  Modula-2 almost does it, but not
  60.     quite, since it limits the size of its opaque types to the size of a
  61.     pointer.  Ada goes one better, but then requires you to say what's actually
  62.     in it, so what's the point?  Opaque data types enable data-hiding (great
  63.     for abstraction purposes), and are all too often very useful.  In C, I
  64.     kludge this by passing back a pointer to the type as a 'void *'.
  65.  
  66. Oh well, some food for thought.
  67.                                 Ug!
  68.