Last night, I was thinking about what i think are advanced ruby language features, namely Continuations (callcc) and Binding objects. I mean advanced because I have a statically-typed oo langages background (C#, Java, C++), I discovered ruby very recently, so these language features are not very familiar to me.
I'm wondering what could be real-world use of these langages features. In my experience, everything could be done with statically typed oo langages, but I agree not very smartly sometimes. I think I figured out the beauty/interest of Continuation reading that nice article from Sam Ruby : http://www.intertwingly.net/blog/2005/04/13/Continuations-for-Curmudgeons
Still, i'm lost with Binding object. Can someone provide me with some real-world examples of something that can be smartly done with Binding object but not very smartly with langages missing the ruby Binding concept?
I was thinking of rollbacking some objects to their initial state when something goes wrong during a long runing process, but I'm not sure this could be implemented with Binding object and I think could be implemented quite smartly by cloning objects before the processing and replacing modified object with their clones when something goes wrong during the processing. So this is not a valid example I think.
Thanks in advance for your help.