Aspect oriented programming: Difference between revisions

m
m (→‎{{header|Wren}}: Minor tidy)
 
(2 intermediate revisions by one other user not shown)
Line 304:
 
=={{header|Perl}}==
The CPAN module <code>Aspect<[https:/code>/metacpan.org/pod/Aspect Aspect] brings features of AOP to Perl. From the documention:
 
The Perl Aspect module tries to closely follow the terminology of the basic Java AspectJ project wherever possible and reasonable.
Line 358:
and manually edit every single call, again so that any future (/temporary) changes are quick, easy & obvious.<br>
Also note the latter is compatible with p2js, whereas namespaces are not.
 
=={{header|Prolog}}==
Phil Hargett [https://github.com/hargettp/aop/ AOP library] introduces an aspect-like framework for Prolog.
 
AOP for Prolog is also introduced on [https://bigzaphod.github.io/Whirl/dma/docs/aspects/aspects-man.html this web page].
 
=={{header|Python}}==
Line 413 ⟶ 418:
Notice also that a client can still import the ''wrapped'' class via the ''wrapper'' module which enables it to call ''unwrapped'' methods without the need to import the ''wrapped'' module as well. To expand the Julia example a little:
 
<syntaxhighlight lang="ecmascriptwren">/* adder.wren */
 
class Adder {
Line 421 ⟶ 426:
}</syntaxhighlight>
 
<syntaxhighlight lang="ecmascriptwren">/* logAspectAdder.wren */
 
import "./adder" for Adder
 
var Start = System.clock // initialize timer for logging
Line 439 ⟶ 444:
}</syntaxhighlight>
 
<syntaxhighlight lang="ecmascriptwren">/* adderClient.wren */
 
import "./logAspectAdder" for LogAspectAdder, Adder
 
var a = LogAspectAdder.add2(3)
9,479

edits