Article View: comp.sys.acorn.tech
Article #193Re: New Language/Compiler (ideas wanted)
From: mcg
Date: Sun, 23 Aug 1992 22:34
Date: Sun, 23 Aug 1992 22:34
73 lines
3965 bytes
3965 bytes
In article <1992Aug17.132929.10141@waikato.ac.nz>, bwc@waikato.ac.nz (Ug!) writes: > Halfdan Ingvarsson asks for ideas on new language features. > > (deep breath) Hokay, here we go: > > Firstly, have a look at Oberon-2. The descriptions are available by anonymous > ftp from ETH. Some really neat ideas there. > > 1. Generics. Any new language worth its salt should consider this issue. One > of the reasons why Ada beats C++ for productivity is that generics beats > object oriented for reuseability. (the other reasons have to do with the > great tools that come with Ada, and the strict licensing scheme which > ensures compatability) > > 2. Subranges. At some stage I'd love to build a language which has *no* > concept of fixed data-type sizes. Of course, you could then have a > library routine which defines a type Word (much like Modula-2's > System.WORD) and Byte and so forth. However, this is entirely a > portability concept, and so is not really applicable to what you are trying > to do, but even so, just think how nice it would be to be able to use > 320-bit integers... > > 3. Overloading. Ada has this, without being Object-oriented. This coupled > with generics gives you better reuseability than object instantiation. > Both functional and operator please. Don't worry about redefining > operator precedence: leave 'em as they are, and folks can work with that. > > 4. One of the things I would like is a 'string' concept, which automatically > handles groups (arrays) of items which grow and shrink - maybe a 'bag'. In > this way you could have a 'STRING OF CHARACTER' or a 'STRING OF INTEGER'. > 'STRING', like 'ARRAY' allocates space, but it can be resized etc > dynamically. Useful. > > 5. Projection. See previously mentioned Oberon-2. This completely redefines > the way inheritance and stuff works. Keeps the language procedural rather > than data-driven, which is nice for those of us who think in processes, not > in data-flows. Coupled with generics, should make life very interesting. > Also, by combining with overloading gives similar capability to object- > oriented, although dynamic binding might be tricky to fudge. > > 6. Packages or Modules or *something*! Preferably coping automatically with > linking (C... yuck!). > > 7. No limitations like 'strings can only be up to 255 in length'. Yuck! > > 8. There is no number 8. > > 9. Can link up with C, including C I/O. > > 10. A good 'ABSTRACT' (or opaque) data type. Modula-2 almost does it, but not > quite, since it limits the size of its opaque types to the size of a > pointer. Ada goes one better, but then requires you to say what's actually > in it, so what's the point? Opaque data types enable data-hiding (great > for abstraction purposes), and are all too often very useful. In C, I > kludge this by passing back a pointer to the type as a 'void *'. > 11. Intelligent type casting. 12. Library orientated (ties in with 6). From Martin Glanvill (mcg@waikato.ac.nz) Dept. Maths @@@@@/|@ University of Waikato @@@@/ |@ Hamilton @@@/__|@ New Zealand @@/ |@ @@@@@@@@ ----------------****=====| A quote to make your day |======****----------------- Always tell him he is handsome, especially if he is not. -------------------------------------------------------------------------------
Technical Details
Message-ID:
<1992Aug24.103407.10312@waikato.ac.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!mcgReferences:
<1195@grun.is> <1992Aug17.132929.10141@waikato.ac.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!mcg From: mcg@waikato.ac.nz Newsgroups: comp.sys.acorn.tech Subject: Re: New Language/Compiler (ideas wanted) Message-ID: <1992Aug24.103407.10312@waikato.ac.nz> Date: 24 Aug 92 10:34:07 +1200 References: <1195@grun.is> <1992Aug17.132929.10141@waikato.ac.nz> Organization: University of Waikato, Hamilton, New Zealand Lines: 73