Re: Adding the ability to add functions into structures?
- From: Artie Gold <artiegold@xxxxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 23:52:35 -0600
Chuck F. wrote:
Walter Roberson wrote:
Albert <albert.xtheunknown0@xxxxxxxxx> wrote:
So structures are useful to group variables, so you can to refer to a collection as a single entity. Wouldn't it be useful to also have the ability to collect variable and functions?
Are there any problems with adding the ability to have functions encapsulated in structures?
structures are data, functions are code. Having the ability to
store functions (instead of function -pointers-) into structures
would require mechanisms by which data become executable. Some architectures (e.g., the Harvard architecture) cannot do that.
In architectures that do allow it, you would allow -all- of your
data to be executable (in which case you have all of the classic
stack overflow problems) or else you need a mechanism to
-dynamically- indicate that a particular block of memory is executable; the existance of such a dynamic method is not at all
certain on any particular system.
Methinks the OP wants lisp.
Methinks too much credit you offer to the OP.
--ag
-- Artie Gold -- Austin, Texas http://goldsays.blogspot.com (new post 8/5) http://www.cafepress.com/goldsays "If you have nothing to hide, you're not trying!" .
- References:
- Adding the ability to add functions into structures?
- From: Albert
- Re: Adding the ability to add functions into structures?
- From: Walter Roberson
- Re: Adding the ability to add functions into structures?
- From: Chuck F.
- Adding the ability to add functions into structures?
- Prev by Date: Re: How to stop reading a file?
- Next by Date: Re: Adding the ability to add functions into structures?
- Previous by thread: Re: Adding the ability to add functions into structures?
- Next by thread: Re: Adding the ability to add functions into structures?
- Index(es):
Relevant Pages
|