Paul, Raoul, David, Mimmo, JvJ, Thanks for use cases. I have better understanding now.
Cheers, - Takahiro On Nov 14, 12:56 am, Paul deGrandis <paul.degran...@gmail.com> wrote: > Here's one use case: > > Let's say you want to develop a library that monitors system behavior and > resources while functions are executed (or while collections are processed). > You might have a collection of monitoring functions (we'll call them > sensors) that check various things, like disk I/O activity. > > We now need a way to annotate our other functions and collections (maps, > vectors, etc) with the sensors that concern them. > For example, maybe we want to ensure a given function doesn't run off with > exponential disk writing (commonly called a 'log explosion') - this defect > caused one of the Mars Rovers to crash. > > One way is to attach the sensors directly to the functions in the form of > metadata. You could then run the functions in a special context that > executed sensors from any piece of metadata. > - - - > > Another example might be that you want to attached additional specification > information to functions, so you can run some sort of analysis/verification > against your code > - - - > > It's difficult to spot the best time to apply metadata, since we've become > accustomed to working in languages without support for it. > Anytime you want to convey programmatic meaning about entities themselves, > metadata is an elegant solution. > > I hope this helps a little. > Paul -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en