The Artima Developer Community
Sponsored Link

Weblogs Forum

16 replies on 2 pages. Most recent reply: Jan 4, 2006 12:05 AM by Cleo Saulnier

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 16 replies on 2 pages [ « | 1 2 ]
Bruce Chapman

Posts: 8
Nickname: chappy
Registered: Mar, 2003

Re: Mixins2 Posted: Nov 22, 2005 5:12 PM
Reply to this message Reply
> You could also use annotations and apt. You could annotate
> your class with a number of mixins:
> @Mixin(TimeStampedImp.class). Next use apt to generate
> your "Mixins" class. This is basically the exact same
> thing that Dynaop does except Dynaop does it at runtime.

For an implementation of this mechanism, check out the package in the rapt project on

The only ugliness is around representing generic types as annotation values, hopefully the JSR-269 facility in mustang will provide a nicer way to do this.

disclosure: I am the author/owner of the rapt project (and serve on JSR-268 expert group)

Cleo Saulnier

Posts: 77
Nickname: vorlath
Registered: Dec, 2005

Re: Mixins2 Posted: Jan 4, 2006 12:05 AM
Reply to this message Reply
You know, while all this mixin stuff is nice and dandy... it sure is messy, isn't it? I've used all sorts of languages and although I mostly use low level languages, I must say that mixins are the ugliest thing I've ever seen in programming.

When using low level languages, you know what's a macro and what's part of the language or what's a CPU instruction. So there's no confusion. I think there's a HUGE confusion going on here as to what's a macro and what's not. This should be seperated into another programming layer higher up than the normal coding pratices such as a preprocessor. This is like meta-programming, but instead of being at runtime, it's done at compile time (with side-effects at runtime).

Sure, it may be tied in closely with the type system, but no matter what way you look at it, it's a glorified macro.


Flat View: This topic has 16 replies on 2 pages [ « | 1  2 ]
Topic: How is Moore's Law really changing computing? Previous Topic   Next Topic Topic: Introducing Neon

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use