Scala and aspects

Can Scala and Aspects be used together? Are there any advantages in this case?

thank

+3
source share
3 answers

Scala is similar to java if you mean, for example, spring -like AOP. I'm sure annotations work either in scala or in java.

On the other hand, the fact that scala has closures (and java doesn't) makes AOP less interesting.

+10
source

In fact, the Scala IDE for Eclipse uses Aspects (because JDT accepts Java):

From Scala Eclipse Support - Monkey - Fix JDT for Fun and Profit? , p16 by Miles Sabin

AspectJ and the Equinox Aspects

  • Aspect Collection is a Patch
  • AspectJ JDT API
  • :
    • JDT CompilationUnit , Java
    • factory

, , . , , Java.

+6
+3
source

Source: https://habr.com/ru/post/1769664/


All Articles