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] |
RB> Are there any plans to add a "tag" argument to gh_new_procedureX_Y() / RB> gh_new_procedure() / scm_make_gsubr() ? RB> The motivation is, as was designed in X-Windows, to pass a "data tag" RB> which can be passed to the procedure (a "callback" in X-Windows jargon). RB> This mechanism allows me to avoid the use of global variables -- the RB> relevant data can be passed along to the procedure. I don't understand what you would need this for. In X, this is used since you don't have closures in C which you basically need for callbacks. In Scheme on the other hand this is easy to do by wrapping a function in a let-form. Since you are defining new Scheme procedures, you are not limited to use C, right? Could you explain the possible applications? Lars -- Lars Arvestad Dept. of Numerical Analysis and Computing Science Royal Institute of Technology (KTH), Stockholm, Sweden