This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: "Magic" Variables?



> I tend to feel that such things are an attempt to make notation more
> "cute" than is really a good idea.  If something looks like a
> variable assignment, it should be a variable assignment, not a
> function call.  A programmer shouldn't be wrong if she assumes that
> assignments are idempotent, etc.

Point granted.

> Tcl variables are an interesting case.  One approach would be able to
> map Tcl variables onto real objects that have "-ref" and "-set!"
> operations, which could be noticed, traced, etc.  This would help with
> implementing aliasing hacks like Tcl's "global" and "upvar", too.

Yes, but what I was thinking about specifically was mixing tcl and
scheme code. Although given the large differences between the two
languages, it is a better idea to just add special tcl procedures for
evaluating scheme forms and make the tcl variable namespace completely
separate from the scheme namespace. But this would miss part of the
point of translators, I think.

 - Maciej Stachowiak