Skip to content

Commit 4048700

Browse files
committed
some design decisions
1 parent ff43ecc commit 4048700

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/src/lecture_07/lecture.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,13 @@ also notice that the escaping is only partial (running `@macroexpand @m2 @m1 1 +
393393

394394
<!-- Why are variables on right-hand side replaced by access to global variables? -->
395395
## Write @exfiltrate macro
396+
Since Julia's debugger is a complicated story, people have been looking for tools, which would simplify the debugging. One of them is a macro `@exfiltrate`, which copies all variables in a given scope to a dafe place, from where they can be collected later on. This helps you in evaluating the function.
397+
398+
Let's try to implement such facility. What is our strategy
399+
- we can collect names and values of variables in a given scope using the macro `Base.@locals`
400+
- We will store variables in some global variable in a module, such that we have one place from which we can retrieve them and we are certain that this storage would not interact with existing code
401+
- the `@exfiltrate` macro should be as easy to use as possible.
402+
396403
```julia
397404
module Exfiltrator
398405

0 commit comments

Comments
 (0)