Article View: comp.sys.acorn.tech
Article #141Re: New Language/Compiler (ideas wanted)
From: Ug!
Date: Mon, 17 Aug 1992 01:29
Date: Mon, 17 Aug 1992 01:29
57 lines
3241 bytes
3241 bytes
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 *'.
Oh well, some food for thought.
Ug!
Technical Details
Message-ID:
<1992Aug17.132929.10141@waikato.ac.nz>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!bwcReferences:
<1195@grun.is>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!bwc From: bwc@waikato.ac.nz (Ug!) Newsgroups: comp.sys.acorn.tech Subject: Re: New Language/Compiler (ideas wanted) Message-ID: <1992Aug17.132929.10141@waikato.ac.nz> Date: 17 Aug 92 13:29:29 +1200 References: <1195@grun.is> Organization: Vooniersity fo Kaiwato Lines: 57