3 ms·
Actually, if you look closely you'll notice that not other language lets you do this either (except through an 'eval' or similar). What I think you actually mea
by jvranish 14y ago
Actually, if you look closely you'll notice that not other language lets you do this either (except through an 'eval' or similar). What I think you actually mean is that this still doesn't let you use closures. But in fact it does! :D You'll have to do a lot of void * casting to make it work though.
- charliesome 14y agoC does not provide closures. You can pass around a struct with a function pointer and a data or state pointer though. That will let you achieve the same thing, but it won't be as pretty.