[plt-scheme] Help with understanding how to reuse macro data
On Jan 3, 2009, at 17:03, Joe Marshall wrote to Grant Rettke:
> Here's the logic behind my opinion. In your example, you are
> manipulating `means to open safes'. You have primitives like `try
> this combination' and `ask Vinnie', and means of combination like
> `first try primitive1, then try primitive2'. Now, given several
> primitives and some combinators, you want to reason about strategy.
> It seems to me that your primitives and combinators should be first-
> class objects. You want to bind them to variables, make lists of
> them, put them together and take them apart, etc.
>
> Macros, however, aren't designed for this sort of thing. A macro
> isn't a first-class object. You are using the macro only to parse
> the list representation of *one* of the primitive means to open a
> safe. A parsing library would get you further, and you wouldn't be
> limited by requiring that the list representation appear as a
> literalin the code.
Maybe there is a use for macros in the artificial safe-cracking
scheme. Macros could be used to deceive the user. Instead of asking
Vinnie or just trying a combination, bindings could be manipulated and
code replaced to send Vinnie's advice or working combinations to an
untrusted third party.
Geoffrey