Programming languages for the 90s — Where to next?

Programming languages for the 90s — Where to next?

Conference .................................................... A tale of t w o conferences Programming languages for the 9 0 s - W h e r e to next?...

313KB Sizes 3 Downloads 53 Views

Conference

....................................................

A tale of t w o conferences Programming languages for the 9 0 s - W h e r e to next? What is the quickest way to produce an emotive, subjective and biased argument amongst software developers? Merely start a discussion on the relative merits of various programming languages. The only advice worth giving in this situation is to leave quickly before blood begins to flow. Unfortunately, this is not much help to those seeking guidance in selecting languages for future projects - which is precisely what many developers want at just this moment. The apparent need for change has been fuelled by the object-oriented wave (bandwagon?) of languages. But, why should programmers change their current programming language? And if so, to what? Perhaps the report below covering two conferences, together with some fairly subjective comments, may throw a little light on the subject.

C plus C + + in Action, 1 0 - 1 2 June 1 9 9 2 'The great thing about C + + is how flexible it is, how you can do almost anything with it. The worst thing about C+ + is how flexible it is, how you can do almost anything with it'. Description of C+ + by a conference attendee (anonymous). This quotation summarizes much of what was said at the C plus C+ + conference held recently at Gatwick, UK. Its purpose was 'to offer the latest on C and C + + concepts, useful research and valuable programming techniques'. It is debatable as to whether 'useful research' information emerged, but - judging from the positive reactions of delegates - it certainly met the other objectives. Although this was billed as a conference, it was really more like a giant seminar session - the 'Boston University C plus C + + Seminar for Europeans'. Thirty individual conference sessions were organized, each of two hours duration. Five parallel sessions were programmed

2 76

for each presentation period. This enabled the organizers to give a very wide coverage of the topic, but, at times, made for frustrating choices. It also means that this report is based on what you might call a 'snap-shot' view of the event (I haven't yet mastered the art of being in two places at once). Is C + + going to be a language of major importance in the next decade? Well, this is like asking circa 1964 if the Beatles latest single was going to make the top ten in the music charts. A more challenging question to answer is why individuals or organizations should change to C+ +. This was a point considered by many of the conference presenters. Placed in the context of C users, there are several good reasons for change: • C + + is designed to support the principles of sound software engineering. • It is inherently more secure, more readable and more maintainable than C. • Object-oriented programming is an intrinsic part of C+ ++ • By developing libraries of objects, extensive software reuse (-an be attained. This can make a signifi{:ant impact on productivity and software reliability+ • There is a relatively {:lear path ot migration fronl C t() (:+-f Dan Saks discussed this last point at some length, recommending that such migration be made in three steps: • Typesafe ( : Use a common subset of ( and C+-+, but compile as a C+ + program. • Object-based C: Program in ( + +, introduce data abstraction (i.e. classes) and access mechanisms. Do not use class derivatives at this level. • Full object-oriented C+ +: Bring in (:lass derivation (inheritance) and virtual functions (polymorphism). It was considered that three major C+ + libraries should be developed -

foundation, user interface and maths. It was also seen to be important to provide interfaces to other libraries, in particular the Fortran maths (NAG) ones. A recurring theme was the way that C++ promoted good software engineering practice. It was also reassuring (in a perverse way) that the speakers were realisti( about the limitations and problem areas of the language. The learning curve to full proficiency is long, as long as three years according to Ralph Hodgson. We do not have a C+ + standard at the moment; it is still some years away (Bjarne Stroustrup, the designer of C+ +). There are well recognized insecurities, obscurities and omissions in the language. Inheritance, unless carefully used, will prove to be highly inefficient vis-a-vis code generation. Moreover, there are likely to be great difficulties in maintaining badly (onstructed classes. Lastly, experience has so far shown that C+ + programs are larger and run more slowly than equivalent C ones+ Having said this, the unanimous view as presented by the Boston University team was a very upbeat one. ( : + + is hereto stay in a bigway. This is reinforced by a recent. advertisement by Bofland claiming that they haw+ shipped over 500 000 of their ( ! + (:ompilers I1 wa,. suggested in the conference that the+ ratio of owners b ) users is roughl'~' 10:1. Even ~o, this means there is at; impressive !~umber ~f p+,opte working with ( + ,~. Now Microsoft have waded into the contest with their latest release, the 'C/( f + 7.0 development system'. This is b()und to give a maj()r boost to the spread ot C + 4. Even m o r e staggering was the+ range of text/professional book,. available for the language. We are also seeing CASE vendors offer OOA and O O D tools with automatic C + code generators, graphical tools fo~ the support of libraries and class relationships, and software ¿~aintenance systems. And, of (ourse, THE relational database te( hnology of the

Mi(roprocessors and Microsystems

Conference 90s is object-oriented (or so the vendors tell us). The conference organization was generally very proficient - a round of applause for Boston University and their extremely helpful staff. But please, two-hour seminar sessions, without a break, are really too much to cope with.

Second International Modula-2 Conference: Modula-2 and Beyond, 1 1 - 1 3 September 1 991 This Modula-2 conference, held last year at Loughborough University of Technology, was quite different to the C plus C + + one. It 'aimed to provide an opportunity for researchers, developers and users of Modula-2 and other modular languages to gather together, exchange ideas and identify future trends'. It also set out to identify the progression from Modula-2 to ISO Modula-2 and the influences of Oberon and Modula-3 on language developments. According to a poll of delegates it more than achieved its objectives. The fact that this was taken at the end of the conference dinner evening amidst the rubble of the wine bottles does not in any way invalidate it! Papers relating to Modula-2 itself demonstrated the maturity of the language. True, several language extensions were presented, but there seemed to be a feeling that these were mainly research/teaching oriented. The ISO standard nears completion, though what effect this will have in the short to medium term is unclear (I have heard it suggested cynically that it takes a good language to survive standardization). And, as to be expected in a conference like this, the educational aspects of the language were well covered. Discussions relating to compilers and development environments supported the view that there is a substantial number of programmers using Modula-2 in earnest. This was reinforced by a strong body of application papers, involving diverse topics such as 'MASCOT-3 multiprocessor architectures using Modula-2', 'Use of HOOD with

Vol 16 N o 5 "/992

Modula-2' and the development of a bond quotation system running under DOS. And what of software productivity? This is an oft-quoted reason for changing to objectoriented programming languages. Perhaps the following extract from Stuart Frost's paper, describing the development of the SELECT CASE toolset, may pour some cold water on such statements: '... ignoring reuse, we find an average productivity level of 2000 lines of executable code per man month . . . . . compares with an industry average of 200 lines per man month'. If you ever want to see a Pavlovian reaction, mention C in a Modula-2 conference. The knee-jerk response is a sight to behold. Prejudices were well-fuelled by a paper entitled 'Modula-2 is three times safer than C'. This may be the case; we are all aware of C's shortcomings. Fortunately, some very sensible people pointed out that we live in the real world. Unless Modula-2 environments and support tools match those of C, it has little chance of it becoming as popular. Co-existence is the watchword, as illustrated in the paper describing a Modula-2 to C interface for a Sun workstation. Within this topic area, there was a fascinating description of reverse engineering C code into - yes, you've guessed Modula-2. Now for Oberon and its objectoriented cousin, Oberon-2. The Oberon programming language was designed by Niklaus Wirth, of Pascal and Modula-2 fame. To quote Wirth, Oberon 'evolved from Modula by very few additions and several subtractions'. Although the language is fairly new, several interesting application areas were discussed, including: • Its use in the teaching of highquality programming. • The development of a compiler for the Windows environment. • Its garbage collection performance on the Macintosh (from Apple Computer Inc.) The Oberon compiler has been ported to a variety of machines, including Sun SPARCstation, 386 PCs, the Macintosh, PS/2 and DECstations.

Like Oberon, Oberon-2 emerged from work on programming languages at ETH Zurich. It owes its existence to Hanspeter Mossenbock, who decided to extend Oberon into an object-oriented language. So far relatively little experience has been gained in its use. This is not surprising as Mossenbock's defining document was issued only in May 1991. ETH have also developed a portable Oberon-2 compiler. We look forward to reports on the use of this language. Going across the Atlantic, we find that one of the most recent OOP languages on offer is Modula-3. This was designed as a joint venture between DEC and Olivetti, the language definition being published in 1988. The background and development to this work were given in a very interesting and entertaining talk by Greg Nelson, of DEC. Modula3 came from Modula-2 via Modula2+, a DEC inspiration. However, its aims are not merely to extend Modula-2 with object-oriented features. It also adds considerable facilities in the form of exception handling, garbage collection, lightweight processes and the concept of 'unsafe' modules. Unfortunately, the only report on its use given in the conference related to teaching (computer science for undergraduates at Cambridge). This ended on a highly encouraging note, which may be of interest to those involved with programming courses. So, as with Oberon, we look forward with interest to hearing of the practical aspects of using the language. At the present time the compiler is hosted on the following operating systems: UItrix, SunOS, Domain/OS, HP-UX, AIX, IBM/4.3, UMAX and RISC iX. It should shortly be available for PCs (Sam Harbison's company, Pine Creek Software, has offered a $1000 prize for the person who first produces such a (ompiler).

Useful advice? How do C + + and the modular languages relate to each other? Are they competitors? Can they co-exist? Why choose one in preference to the other? Here is where a crystal ball would be useful.

277

Con£crcncc

..........................................................

It is probably easier to first consider the current situation. A striking difference between the two conferences was the make-up of the audiences and their essential goals. These are clearly demonstrated by the content and objectives of the keynote addresses. Dr Stroustrup's was entitled 'From C to C+ +'. This was very well delivered, but the technical depth was surprising for a keynote talk (several delegates made this comment). In contrast, Professor Gustav Pomberger opened the Modula-2 conference with a paper entitled 'Software engineering education - Adjusting our sails'. What we had then at the C + + conference was mainly working programmers from industry, commerce and similar areas. Many (if not most) had a C background. From the discussions that took place in the seminars, they took great pride in their programming skills. What grabbed their attention and made them really excited were the detailed programming aspects of C and C+ +. The Modula-2 delegates were quite a different bunch. There was very strong representation of academic and research institutions, far fewer (about 30%) coming from industry, commerce etc. Here the development of languages per se was less important than their role in supporting good software engineering. Perhaps this is a simplistic way of distinguishing

278

between the two groups. Yet, while a C programmer may ask 'will this make my code more efficient?', the Modula developer is likely to enquire 'will this help me to build better software?'. And what of the future? If we exclude Fortran, Cobol and Basic (which are always going to be important), then a clear pattern is likely to emerge. There will be two groups. First, and dominant, the C/C+ + sector. Second, a substantial group made up of a variety of general purpose and specialist languages. This will include Modula-2, Modula3, Oberon, Eiffel, Smalltalk, Pascal, Ada etc. If you currently work with C, then there are strong reasons for moving to C + + . This is also true if your work involves graphical user interfaces, Windows developments, Unix environments and database design. But, be warned. C + + is a BIG language. It is more complex structurally and semantically than Ada. And programmers (-an still exercise their creativity and individuality by using obscure, convoluted and bewildering C constructs. If, however, by contrast, you: • place much greater emphasis on software engineering than on program development, and • believe that languages should be small and simple

then look Oberon.

at

Moduia

and

Some information For copies ot tile proceedings of the C plus C + + in action conference, contact: Boston L;niversity Conference Office, 4.3 Harrington Gardens, london SW7 41U, UK Modula-2 conference proceedings can be obtained from: Modula-2 Secretariat, Centre for Extension Studies, Loughborough University of Technology, Loughborough, Leics, LE11 ]TU, UK Free Modula-~; Compiler, from DEC Systems Research Centre: This is available over emaiL by anonynqous ftp from 'gatekeeper.dec.corn'. Alternatively, (ontact: RTA Ltd, 59 Canning Road~ Croydon, CR0 6QF, UK Modula-3 News: Pine Creek Software, ]05 South Craig St., Suite 300, Pittsburgh, PA 15213, USA Oberon compiler (for DOS and Windows): Robinson Associates, St. Marys Street, Painswick, Glos. GL6 6QR, [JK

Jim Cooling Software Series Editor

Microprocessors and Microsystems