lambda-like expressions for C
- From: Edward Peschko <esp5 mdssirds comp pge com>
- To: gtk-list gnome org
- Subject: lambda-like expressions for C
- Date: Wed, 9 Apr 2003 19:55:01 -0700
hey all,
I was wondering if anybody knew of a lambda-like expression api for C... what I'm looking
for is something like:
int variable = 15;
lambda ("if (_1 < 50) fprintf(stderr, \"HERE -- %d\", _1); ", variable);
where the first string would be evaluated at run-time, and execute the code, substituting
the value in 'variable' for _1. (sort of like fprintf, except the strings that 'lambda'
would take would support a subset of the c-api)
what I'm ultimately looking for is the ability to take this string from a file
(or other source), and reconfigure what the program is doing on the fly, without
recompiling. Ultimately, I want to use this for debugging purposes - ie: being able
to debug programs via configuration file without a debugger.
Does anyone know an api like this/one that is available? If there isn't, would the glib
team be interested in helping design one, and integrating it into glib?
Ed
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]