[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [e4-dev] dependency injection through (equinox) aspects?
|
Interesting.
I'm all in favor of semantic markup that makes written
programs more expressive, i.e. better convey the programmer's intent. This
allows for better automatic correctness checks, and
refactorings.
I have mentioned a few times already that I'd consider
using Generics as much as possible a big plus. Aspects are similar in some
sense. Up to now, the blocker has always been that there is some interest (not
sure if requirement) to
-
Build and run Eclipse out-of-the-box on unmodified stock JVMs,
and
- Build
and run Eclipse (the core pieces) on J2ME micro JVMs (which are unfortunately
on Java1.4 level without Generics).
For Generics, tools like Retroweaver would allow compiling Java5 Sources
into Java1.4 compatible binaries. And at Eclipse, we are in the fortunate
situation that we "own" a Java compiler (ecj) which - I've been told - even has
the undocumented -jsr14 switch for compiling generics into Java1.4
binaries.
In terms of annotations, however, I'm not sure if such "back-compiling"
is possible since the classfile format needs to support the
annotations.
Cheers,
--
Martin Oberhuber, Senior Member of Technical
Staff, Wind River
Target Management Project
Lead, DSDP PMC Member
There are other cases where aspects combined with annotations can be used
efficiently:
E.g., instead of writing
public void myUICode() {
Display.syncExec( new Runnable()
{
public void run() {
... do something
}
} );
}
you would just do...
@RunInUI( sync = true )
public void myUICode() {
... do
something
}
There are many other use cases like this one...