[plt-scheme] Re: Novice question: evaluating symbols
On Fri, Jan 08, 2010 at 08:17:01AM -0600, Robby Findler wrote:
> Turning symbols into identifiers at runtime is fundamentally an
> eval-like thing and should be avoided in any well-designed language
> (to get in my high horse for a moment).
>
> Computing with identifiers and thier names at compile time, on the
> other hand, can also be confusing and lead to some funny issues, but
> at least does not require invoking your compiler at runtime and all of
> that baggage.
Maybe I've been thinking about symbols in the wrong way all
along. What's your distinction between symbols and identifiers?
>From my background, they're more or less synonymous.
In my mind, symbols are implicitly dereferenced
pointers-to-anything with a few extra features like
string->symbol etc. It seemed natural to me that, once x was
(implicitly) dereferenced to the symbol date-year, date-year
could be (explicitly) dereferenced to a procedure value. eval
was the obvious but heavy-handed way to do that. Am I not
"thinking in Scheme" here?
MJG