Wikipedia seems to say that C++0x will support anonymous functions. Boost also seem to support it. However I'm using .NET so if I could stick with it it would be awesome.
Basically I just want to write some quick code for objects. I have a robot which can have about 85 - 90 states. Most of the states are just "integer values passed to the robot microcontroller". So I tell the robot to go to state 35 for example.
However some states require additionnal manipulations such as user input so I'd like to keep it simple and write just a few lines of code for the differences. I've considered using derived classes but it involves a lot of code just to modify a few lines.