Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!encore!pierson From: pierson@encore.com (Dan L. Pierson) Newsgroups: comp.lang.c++ Subject: Re: c++ vs ada results Message-ID: Date: 24 Jun 91 20:05:16 GMT References: <1991Jun18.041751.3740@netcom.COM> <1991Jun18.122812.18190@eua.ericsson.se> <1991Jun20.220947.23970@sctc.com> <1991Jun24.115421.1@sdl.mdcbbs.com> Sender: news@Encore.COM Organization: Encore Computer Corporation Lines: 45 Nntp-Posting-Host: xenna.encore.com In-reply-to: alanb@sdl.mdcbbs.com's message of 24 Jun 91 10:54:21 GMT Regarding Re: c++ vs ada results; alanb@sdl.mdcbbs.com adds: > Of those, C++ seems the best compromise for a lot of work - I've not seen > modula-3 though - anybody out there able to comment on it? (Of course the fact > that it isn't widely known is one reason not to use it, but not overwhelming). Very Roughly: To make Modula-3, take Modula-2 and: + Add single inheritance objects (MI interaction with modules is not well understood). - Remove varient records (no longer needed). + Add garbage collection. + Add exception handling. + Add Safe/Unsafe module distinction. o Change name equivalence to structural equivalence. + Support concurrent threads with a required module. + Add generics (in "Twelve Change to Modula-3" mail of 12/19/90). The result is a language with roughly the same power as C++ but a good deal more safety and simplicity. The total definition is actually much smaller. IMHO, it's a much better language than C++. As usual with Pascal family language there will be some runtime penalty for things like array bounds and arithmetic overflow checking. As usual, good compilers will let you turn these checks off if you want to. Other than that, there's no reason why a decent compiler should produce code that's any worse that C or C++. For an example of Modula-3 in use, get Digital System Research Center report 53, "IO Streams: Abstract Types, Real Programs". The language definition is also available as report 52. Last I knew, both of these were available free by requesting them from the SRC librarian. A book, "Systems Programming in Modula-3", may be available by now. You're right that current implementation status is a major handicap to adoption. The only current implementation is the free, mostly portable, Modula-3 to C compiler from SRC. A group at UMass Amherst is working on a gcc-based compiler, but hasn't announced an availability date. -- dan In real life: Dan Pierson, Encore Computer Corporation, Research UUCP: {talcott,linus,necis,decvax}!encore!pierson Internet: pierson@encore.com