guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Placement of defines


From: Sebastian Tennant
Subject: Re: Placement of defines
Date: Fri, 19 Dec 2008 11:18:34 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Quoth address@hidden (Ludovic Courtès):
> Sebastian Tennant <address@hidden> writes:
>
>> Incidentally, perhaps you can tell me why the first argument to this
>> compile-friendly macro has to be a string for it to work.
>>
>>  guile> (define-macro (definer var val)
>>           `(define ,var ,val))
>>  guile> (definer 'foo "bar")
>>
>> appears to have worked, but...
>>
>>  guile> foo
>>  ERROR: Unbound variable: foo
>>  ABORT: (unbound-variable)
>
> Try this:
>
>   (definer foo "bar")

Yes it works.

Damn.

After much experimenting and head scratching...

Question: When is a variable not a variable?

  Answer: When it's about to become the name of a variable.

:)

Seb





reply via email to

[Prev in Thread] Current Thread [Next in Thread]