Re: AOP and parametric polymorphism

From: Andrei Alexandrescu (andrei@cs.washington.edu)
Date: Fri Nov 22 2002 - 20:14:56 PST

  • Next message: Craig Chambers: "Re: AOP and parametric polymorphism"

    ----- Original Message -----
    From: "Keunwoo Lee" <klee@cs.washington.edu>
    To: <cecil@cs.washington.edu>
    Sent: Tuesday, November 05, 2002 15:05
    Subject: Re: AOP and parametric polymorphism

    > And if AOP is metaprogramming, then its power is essentially limited only
    > by the expressiveness of the particular metalinguistic constructs you
    > provide. In a sufficiently expressive AOP system, you could express
    > *every* language extension as an aspect. And, indeed, that's what you can
    > do in Lisp, where every program is an s-expression and you can execute any
    > computable function over a program.
    >
    > Therefore, the question is not: "How expressive is AOP?" Rather, one
    > should ask: "How expressive do you want AOP to be, and what constructs
    > give that expressiveness while retaining modular reasoning, etc.?" My
    > opinion of AspectJ is that it seems to give you too much power (or the
    > wrong kind) and not enough modular reasoning.

    So indeed. In a break during my talk, I was talking to an older guy, and he
    told me: "I've done something similar with InterLISP, which has :before and
    :after functions (invoked automatically before/after calls), and it was a
    maintenance nightmare. Every so often, something we knew worked did not work
    anymore because someone had added some :before/:after function."

    Another guy in the audience, when I said AOP can "intercept" variable
    accesses in read and write, and asked "What do you think you can do with
    this?" said: "Break encapsulation?" (I was expecting something along the
    lines of uninitialized access detection, lazy initialization etc.)

    Looks like AOP is good at enforcing static global policies. Threading, error
    handling, and tracing are the classic examples. For these, other paradigms
    offer only awkward solutions. Aside from those, however, it seems like not
    much other compelling examples for AOP are appearing!

    Andrei

    _______________________________________________
    Cecil mailing list
    Cecil@cs.washington.edu
    http://mailman.cs.washington.edu/mailman/listinfo/cecil



    This archive was generated by hypermail 2.1.5 : Sat Nov 23 2002 - 09:24:29 PST