🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sw.components
Article #49

Re: Inheritance vs. component effic

#49
From: William Thomas Wolfe,2847,
Date: Fri, 25 Aug 1989 14:41
29 lines
2141 bytes
From article <130200009@p.cs.uiuc.edu>, by johnson@p.cs.uiuc.edu:
> Many, if not most, languages do not allow pointers to functions to
> be stored in structures.  In particular, Ada does not.  

    This is one of the proposed Ada 9X revisions, and I think there
    is a fairly high probability that it will get through.  However,
    it is important to note that the 'ADDRESS attribute provides almost 
    the same thing (ANSI/MIL-STD-1815A, Appendix A, paragraph 2):

       P'ADDRESS   For a prefix P that denotes an object, a program unit,
                   a label, or an entry:  Yields the address of the first
                   of the storage units allocated to P.  For a subprogram,
                   package, task unit, or label, this value refers to the
                   machine code associated with the corresponding body or
                   statement.  For an entry for which an address clause has
                   been given, the value refers to the corresponding hardware
                   interrupt.  The value of this attribute is of the type
                   ADDRESS defined in the package SYSTEM.  (See 13.7.2.)


    A value of type ADDRESS can then be converted to an arbitrary pointer
    type through the use of UNCHECKED_CONVERSION.  The major restriction,
    then, is not an inability to store a pointer to a function in a record
    type; rather, it is the fact that there is not a mechanism which can
    express the desire to invoke the function residing at that address;
    the 9X proposed revision would therefore provide such a mechanism. 


    Bill Wolfe, wtwolfe@hubcap.clemson.edu
Technical Details
Message-ID: <6333@hubcap.clemson.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!hubcap!billwolf%hazel.cs.clemson.edu
References: <130200009@p.cs.uiuc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!hubcap!billwolf%hazel.cs.clemson.edu
From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe,2847,)
Newsgroups: comp.sw.components
Subject: Re: Inheritance vs. component effic
Message-ID: <6333@hubcap.clemson.edu>
Date: 25 Aug 89 14:41:01 GMT
References: <130200009@p.cs.uiuc.edu>
Sender: news@hubcap.clemson.edu
Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu
Lines: 29