| re: .0, .2
You answered it yourself. Modula-3 does not support multiple
inheritance. Even though the concept is similar to classes in other
languages, there are several important differences. You may want to
read the following Wirth's papers on which, I think, the objects in
Modula-3 are based. I agree that the report is concise and some
sections do need further clarification; overall, I think it is a
commendable job. If you have read Paul Rovner's paper before, you will
find the report easier to understand.
You are right regarding the difference between traced and unbtraced
objects. Greg Nelson, one of the designers of Modula-3, believes that
more and more programs in future will rely extensively on automatic
garbage collection. I think he is right; it keeps the programs safe and
the programmer is not burdened with keeping track of
allocation/deallocation. However, due to performance reasons or
otherwise, one doesn't want to have the objects traced. Greg says that
in building the SRC window system, they used traced references
everywhere except in a couple of places at the lowest level and thus
kept the programs safe without loss of performance.
Even though Modula-3 is a strongly typed language it has some problems
regarding type equivalence. An accidental type equivalence may weaken
the power of strong typechecking. I understand that the design is being
changed to remedy this problem.
Hanuma
%A N. Wirth
%T From Modula to Oberon
%J Software-Practice and Experience
%V 18
%N 7
%D July 1988
%P 661-670
%K OOP, programming languages
%A N. Wirth
%T Type Extensions
%J ACM Transactions on Programming Languages and Systems
%V 10
%N 2
%D April 1988
%P 204-214
%K data types, data abstraction, OOP
|
| Does anyone have the Modula-3 language definition on-line? This
is the first I've heard of Modula-3, and I'd very much like to find
out more. Failing an on-line copy, how about a pointer that our
library would understand?
John
PS: After several years of Algol-68 programming, I agree wholeheartedly
with the comments of .-1 about automatic garbage-collection. The
benefits in programmer productivity (and error-free programs) that
being able to forget about storage reclamation brings far outweigh
the small loss of performance that automatic garbage-collection
causes, especially if the programmer can cause the garbage-collector
to be invoked at times when he knows there is likely to be a lot
of reclaimable storage. Recent developments in continuously scanning
garbage-collection algorithms for distributed systems offer the
possibility of reducing the performance penalty of automatic storage
reclamation still further.
|
|
I'm wondering about the lack of multiple inheritance in Modula-3.
I keep running into a need for it even in C++ which I'm currently
learning and which lacks the feature as well (current version).
May be I haven't yet learned how to properly define objects.
Is multiple inheritance generally considered unnecessary or a "frill"
in OOLs ? If not, why did Modula-3 leave it out ? If yes, how does
get around the need for it ?
/Ashok
|