Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: Perobject association (was: [aspectj-dev] pertypewithin() vs. pertype() association...)

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nicholas Lesiecki wrote:
> I've been thinking about perobject aspects in the shower and I've
> decided that the current perobject aspects handle several concerns.
> I think it's worth dissecting them for greater clarity of thinking:
>    
> 
[...]
> Ideally, the perobject aspects would give the programmer control
> over all four concerns. Ok, that's all I have for now. Does anyone
> want to pick up this ball and run it the next few yards?  

I completely agree. Also I think that perobject asoects would
eventually yield a much clearer instantiation model. As Mira Mezini
et al. showed in their CEASAR implementation, perobject aspects and
percflow aspects actually completely suffice to implement all the
instantiation models we have in AspectJ today:

aspect A perthis(<Type>) {

}

is nothing more than:

aspect perobject(<Type>) {

	after(<Type> t) : this(t) {
		associate(t);
	}

}

Same counts for pertarget *and* the newly proposed pertype as well,
given that "pertype" actually means not more than "perobject", the
"object" being the metaclass <Type>.class for any newly initialized
type.

Thus in the one could even completely loose perthis, pertarget,
pertype, ... (not percflow, that'S really different), since they
actually all are just special cases of object-associated aspects! In
my personal opinion that would be much clearer than today. You can
associate aspects with a set of objects or with a control flow. Not
more.

If one still wants for the sake of brevity a "perthis" aspect, one
could probably find a means of inheriting instantiation advice (as
above) down to subaspect types in a well-defined way. So you could
have a PerThis super-aspect as above and all subaspects *may* have
the option to inherit this instantiation model. Same again for
pertarget, pertype.

Does this make sense?

Eric

- -- 
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQfp66swiFCm7RlWCEQKhiwCfd08TMLxbQ2WozaW+Nil8RcvcoWoAoMPU
XSshRoN5eBnOig6qHEb4XNJC
=3woV
-----END PGP SIGNATURE-----




Back to the top