Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does AspectJ permit aspects to access and add members of another type? Isn that violating OO encapsulation?

0
Posted

Why does AspectJ permit aspects to access and add members of another type? Isn that violating OO encapsulation?

0

In the spirit of Smalltalk, we have decided to give more power to the language in order to let the user community experiment and discover what is right. To date this has proven to be a successful strategy because it has permitted the construction of many useful aspects that crosscut the internal state of an object, and as such need access the its private members. However, we are not discounting that some sort of restrictions are useful, rather, we are seeking input from the community in order to decide on what these restrictions should be.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.