Aspect oriented programming: Difference between revisions

m
(Aspect oriented programming in Prolog)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 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 426:
}</syntaxhighlight>
 
<syntaxhighlight lang="ecmascriptwren">/* logAspectAdder.wren */
 
import "./adder" for Adder
 
var Start = System.clock // initialize timer for logging
Line 444:
}</syntaxhighlight>
 
<syntaxhighlight lang="ecmascriptwren">/* adderClient.wren */
 
import "./logAspectAdder" for LogAspectAdder, Adder
 
var a = LogAspectAdder.add2(3)
9,477

edits