in reply to Re (tilly) 3: problem with variable values
in thread problem with variable values

Tilly's graphing problem is an interesting example of a case where one would want to use a closure because of a special feature that it has (It is only compiled once). When I first learned about them (on this board) a few months ago I read that closures were useful but I had trouble thinking of a concrete example.

My understanding is closures also have special features in languages other than Perl. I suspect that the special features of closures first appeared in languages as a result of an oversight, but once they appeared programmers found them useful. If so, closures are an example of a random mutation that survives because it enhances the survival of what it mutates. Kind of like feathers on dinosaurs as they evolved into birds.

  • Comment on Re: Re (tilly) 3: problem with variable values