Cirrus is an infrastructure for Aspect-oriented Programming (AOP) using the Elements compiler, available in all five languages.
Cirrus extends the attributes system with full support for Aspect-Oriented Programming, allowing the developer to separate concerns such as logging, security or other functionality orthogonal to the regular class hierarchy into Aspects that can be attached to classes or their members, as needed.
Functionality that otherwise would need to be reimplemented in various places across an application or framework can be encapsulated in reusable form and maintained in a single place. Elements allows developers both to reuse existing aspects written by third parties or included with the compiler’s standard aspect library, as well as to create their own aspects.
Aspects can only be implemented using the .NET platform. They can then be applied to code for any of the four platforms, .NET, Cocoa, Java and Island.
Aspects can be applied in all four languages, using the same syntax as for regular attributes. On Oxygene and C# this is done by enclosing the aspect name in square brackets (
[SomeAspect]), in Swift by prefixing it with an "at" symbol (
While aspects can be used on all three platfroms, but they can be only implemented using .NET.