Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: R: Re: [aspectj-users] ITD syntax

That's quite a good discussion we've had!

There are indeed two different model for implementation for ITDs as
Herman distilled well: the classic member introduction (the current
code-style AspectJ model and Dave's original proposal) and delegation
model (the one implemented in @AspectJ's @DeclareParents and most
likely implementation of my "declare extends" proposal)

So I guess we have two questions to ponder:
1. Do both model make sense. If yes, how to best present them to avoid
confusing users (ss Simone pointed). If not, what should be the status
of @DeclareParents in @AspectJ.
2. (Back to Dave's original question) What is best syntax for "bulk
ITD" i.e. introducing a set of members with a simpler syntax.

-Ramnivas


2008/12/5 Simone Gianni <simoneg@xxxxxxxxxx>:
>
>
>> Hi Herman,
>> you perfectly got the point. We are moving from IDT to something else, and
>> that what I felt in the first place without being able to express it with
>> the clarity you had. I agree on splitting this thread on "A simpler syntax
>> for IDTs" and "A delegation approach to IDTs".
>>
>> As long as the simpler syntax for IDTs in involved, I like Dave's
>> proposal, also because it uses a construct very similar to the "with", which
>> is present in a number of languages but missing in Java, and many
>> programmers are already used to it. Also, it simply requires less typing
>> without changing the semnatics of the IDT.
>>
>> There can be better ways of doing mixins/IDTs, including the delegation
>> based ones, but that's another discussion.
>>
>> Simone
>>
>> ----- Messaggio originale -----
>> Da: Ichthyostega <prg@xxxxxxxxxxxxxxx>
>> A: aspectj-users@xxxxxxxxxxx
>> Posta Inviata: giovedì 4 dicembre 2008 22.42.08 GMT+0100 Europe/Berlin
>> Oggetto: Re: [aspectj-users] ITD syntax
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi Dave,
>>
>> > I'm glad for this discussion because it's helped me in refining how I
>> > think
>> > this would work best.
>> Same here. I saw your answer just after posting mine.
>> Probably we are facing a decision on two possible routes to take:
>>
>> - - provide some convenience for Delegation using AspectJ
>> - - stick to the ITD semantics but provide a better syntax.
>>
>> My feeling is we would be best off if we took a clear decision on
>> one of those routes and don't try to mix them up. Even if we were
>> able to come with a combined solution, it will confuse people.
>>
>> Thus, if we go the "Delegation" route, "this" should be really rebound
>> the moment we are within the scope of the delegate to mean the delegate,
>> the same way as if all of this was just implemented in plain Java.
>> OTOH, when going the "ITD" route, the source class (ITDDefaultImpl
>> or DoSomethingImpl) is rather sort-of a template for code woven into
>> the target. I.e., at runtime, no class DoSomethingImpl will be loaded.
>> Then the question remains what should happen with private fields.
>> Consider, both the class Doer and class DoSomethingImpl may use
>> a private field with the same name for their implementation.
>>
>> Hermann
>>
>>
>>
>>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFJOE6wZbZrB6HelLIRAjRcAJ9lpaNl/nFsSX/dTl34LL364s5qyQCfQ8wS
>> CmLlX5bTe+LvoI6V8sh29K8=
>> =EYAe
>> -----END PGP SIGNATURE-----
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top