[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Assignment between strong pointers
- To: <eric@son-of-blob>
- Subject: Assignment between strong pointers
- From: Mark S. Miller <mark@xxxxxxxxxxx>
- Date: Tue, 7 Nov 89 12:07:34 PST
- Cc: <xtech@son-of-blob>
- In-reply-to: <eric@son-of-blob'smessageofTue>,26 PST <8911071937.AA01645@xxxxxxxxxxxxxxxxxxxxxxx>
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.