But [C]'s lacking in some very useful higher level
features (like
strings and lambda expressions, for example).
Actually, if you use gcc instead, it has something very much like
lambda-expressions in many of their common uses. You don't get real
data-as-code lambda expressions, but you get functions with no real
name which appear textually at the point of use. For example,
qsort(vec, n, sizeof(FOO),
({ int cmp(const void *a, const void *b)
{ return( ((FOO *)a)->sortkey -
((FOO *)b)->sortkey );
}
&cmp;
}) );
It's one of the four extensions to C I like and use; I find they
greatly increase the utility of the language. (The others are nonlocal
gotos as a throw mechanism, array sizes which are not compile-time
constants, and labeled control structure - the last not being present
in stock gcc.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B