2004-07-19
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 3 of 6 )
-oriented programming ">
Speaking of DARPA and technology they have funded, what's your position on aspect-oriented programming?
AOP is kind of a complicated one for me, because AOP is one of these things where the theory sounds really good. I actually mostly like the theory. The way it turns out in practice tends to be pretty dangerous. It's fraught with all kinds of problems. You know when the AOP folks talk about AOP they list you like three or four use cases for AOP and they actually mostly make sense, although they have problems in the details. But there actually aren't very many use cases outside of that. And when you find people who are using AOP, the average ones that I've talked to have been using it for things that are just like incredibly inappropriate. It's like a really, really, really bad idea to be doing what they're doing. And so I feel very conflicted because on the one hand I basically like the concept, but I don't think that the research community has really figured out how to encapsulate those in a mechanism that really works for people. It's like giving them a chainsaw without any safety instructions.
Marc Fleury of JBoss says he thinks Enterprise JavaBeans 3.0 is an example of AOP in some respects.
Yeah, well there are a lot of things that one can think of as examples of AOP in some respects. The debugging framework in Java is an example of AOP in some respects. There's a performance monitoring facility in 1.5.1 that looks a lot like AOPI mean that kind of instantiation of interesting uses of AOP. And because they're narrowly focused they actually manage to be really safe and useful. [Otherwise,] it feels like handing razor blades to children. You've got to have razor blades to shave your beard, but oh my God, don't let five-year-olds do craft projects with them. And of course most of the people out there using AOP aren't 5-year-olds doing craft projects, but they're easily tempted. It just seems to me that that there's just a better way.
Can you talk a little about support for scripting? How is Sun expanding that?
Well, there's a set of APIs for interacting with scripting languages that appeared in 1.5. Lots of people have actually used Java itself as a scripting language. If you build the frameworks right, Java actually works pretty well as a scripting language. We tend to use all kinds of scripting languageswhatever's out there.
Do you have any favorites? For instance do you like Groovy?
I think Groovy is pretty interesting. I think they're being fairly conservative. I think they could be a little more outlandish and get a little more interesting.
In what way?
I remember sort of reading through their syntax list and saying, "Oh, why didn't you do this and why didn't you do that?" There were some things about the way that they did sort of the equivalence of declarations and some things about the way they did case switch statements I sort of felt like writing them this long letter and saying, "What? Why didn't you do it this way?" You know (laughter). So they actually had some neat stuff in there.
But I like Groovy a lot. We sort of got into political hot water when the whole JavaScript thing happened. So we've tended to try to have sort of an arm's length relationship to anything having to do with scripting. We're happy to use scripting; we do a lot of scripting ourselves . I actually did a pretty nice scripting language; at least I think it was nice, back in the early days. And I threw it in the trash can when the whole JavaScript thing with Netscape happened. And you know, in retrospect, ugh, what a bizarre thing to have done. But, you know, it's water under the bridge.
![]() |
|


