Date: Tue, 15 Sep 92 10:36:31 CDT
From: billb@jupiter.fnbc.com
To: gnu-objc@prep.ai.mit.edu
Subject: Re: method pre and post code messages
Cc: athan@object.com (Andrew Athan)
> > billb@fnbc.com (Bill Burcham) writes:
> > Also, while I have your ear, wouldn't it be nice to have some more
> > powerful reflective facilities in the language. Maybe I just need to
> > dig deeper into Obj-C++, but I haven't seen the kind of facilities
> > that I really need. If such changes are _off_limits_ for this
> > projects then just stop reading _now_.
> >
> > An example of a useful reflective capability would be the ability to
> > override an Object method that would automatically get invoked every
> > time any method is entered; I would also like a similar method for
> > method exit. I would like to be able to override these methods for a
> > given class, and additionally for particular instances of a class.
>
> Object Oriented languages do not generally support this
> feature. Specifically, Obj-c does not support this
> feature. It would remove the systemic benefits of object
> oriented encapsulation. However, Obj-c retains the
> extensibility of C; this allows you to implement these
> features as you see fit.
>
> Ben Tucker
> Ben_Tucker@mcimail.com
Thanks for your input Ben.
What do you mean by: `remove the systemic benefits of object oriented
encapsulation'? If you look at the references I cited in my original posting,
I believe you will agree that no encapsulation is lost (it is pointless for me
to argue the point in this space -- I would just end up quoting those papers).
BTW this is just _one_ of the powerful tools mentioned in those papers. They
also mention features such as Smalltalk and Lisp's ability to interpret data as
code (which I would also like). As we get mega-fast machines, what is the point
of limiting ourselves to static code?
Yes, I agree that Obj-C does _not_ support overriding message handling behavior
in the manner proposed in my original posting. My point is that I would like it
to support this feature and perhaps many more. While `Obj-c retains the
extensibility of C', I would like it to be much more extensible than C. I _have_
implemented the aforementioned features in Obj-C `as [I] [saw] fit' in an app I
recently wrote, and found that it involved my bracketing certain methods in just
the manner described in the papers. This caused me to pause and think -- hey maybe
those guys have a valid point.
Bill
|