[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Wed May 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

225.0. "Modula-3 inheritance" by ASHOK::NADKARNI () Tue Mar 07 1989 09:07

    I posted this in the MODULA-2 conference and then remembered this
    conference.
    
                   <<< TURRIS::NOTE$:[NOTES$LIBRARY]MODULA.NOTE;2 >>>
                              -< Modula-2 Notes >-
================================================================================
Note 79.0                     Modula-3 inheritance?                   No replies
ASHOK::NADKARNI                                      19 lines   7-MAR-1989 08:53
--------------------------------------------------------------------------------

    Since I'm currently doing a course on languages and compilers, I
    thought it might be interedting to read the Modula-3 report. As
    the report itself says, it is concise which means a lot of things
    are unclear to a neophyte (me). Anyway here's my question - 
    
    I kind of understood how inheritance is defined but I couldn't figure
    out if the language allows multiple inheritance or not. If so how
    what is the construct ? It seems to me as though multiple inheritance
    is not possible since the object fields have to be the first fields
    in the data record?
    
    I know this is a Modula-2 conference and not M-3, but was the most
    appropriate place I could find.
    
    Thanks,
    
    /Ashok
                                
    
T.RTitleUserPersonal
Name
DateLines
225.1Traced?TLE::COURTNEYFri Mar 10 1989 08:425
    
    I also have a modula-3 question - what do they mean by traced and
    untraced objects?
    
    dc
225.2traced=garbage collectedASHOK::NADKARNIFri Mar 10 1989 08:458
    From my limited understanding ,
    
    traced == eligible for garbage collection
    
    untraced is not.
    
    /Ashok
    
225.3Modula-3 - a safe and sound languageCOOKIE::KODAVALLASat Mar 11 1989 13:1547
    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
225.4ULTRA::WRAYJohn Wray, Secure Systems DevelopmentSat Mar 11 1989 13:5818
    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.
225.5COOKIE::KODAVALLASat Mar 11 1989 15:0315
             
    You can copy the report from
    
    cookie::disk$fig_2:[kodavalla.public.src]t23_modula3_report.ps
    
    .txt is also there in the same directory.
    
    It is SRC Research Report 23; you or your library can obtain SRC
    reports by writing to:
    
    SRC Research Center
    130 Lytton Avenue
    Palo Alto
    CA 94301
    
225.6MI unnecessary ?ASHOK::NADKARNISun Mar 12 1989 13:1512

    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
225.7CIRCUS::SRCNOTESMIPSBX::thomasThe Code WarriorTue Mar 14 1989 17:561
The SRC keeps a conference with all their research abstracts....