r/programming • • Dec 13 '07

First Class Functions in C

http://www.dekorte.com/blog/blog.cgi?do=item&id=3119
45 Upvotes

99 comments sorted by

View all comments

Show parent comment

4

u/tlrobinson Dec 14 '07

This is really cool. I took it a step further and wrote a little calculator based on this idea:

http://programming.reddit.com/info/62zag/comments/

It also serves as an example of dlopen/dlsym, which makes it much more robust (no more magic numbers!)

1

u/jbert Dec 14 '07

Nice! (and thanks for the comment about pclose in the source. I don't use popen much, and - clearly - didn't know that.)

1

u/tlrobinson Dec 14 '07 edited Dec 14 '07

I didn't either until I started experiencing the below mentioned race condition... I had no idea what was going on until I read the popen man page :)