[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Assignment between strong pointers

Does the compiler like the following alternates for cases #1 and #2?
Even if it does, these alternates are worse than case #3.  However, if
this works maybe perhaps it will lead to something else that works.

1')	PTR(Foo) func (PTR(Bar) barP) {
		return (PTR(Foo)) barP;

2')	PTR(Foo) func (PTR(Bar) barP) {
		PTR(Foo) fooP = (PTR(Foo)) barP;
		return fooP;

What if we add a 

    LEAF operator SUPERTYPE * ();

where SUPERTYPE is the declared immediate superclass of TYPE?  Does
this help any of the cases?  (If it does, then our HIDDEN_CLASS macro
may be in trouble.

Isn't it amazing how empirical one has to be with what are claimed to
be formal systems?

Overall, my impression is that our source code in C++ is going to
start looking rather awkward (not simply as a result of the above, but
cumulatively from all the little problems).  This makes developing in
Smalltalk that much more attractive (keep the source clean; hide cruft
in the translator).  Unfortunately some of us are stuck for a while.