On Mon, Jan 5, 2009 at 1:29 AM, Brian Doyle <brianpdo...@gmail.com> wrote: > ... Instead of > just returning a hash of errors what about returning the record with the > errors hash in > the metadata? That way you just have the data and the errors in one
That's an interesting idea. On the one hand it seems weird to me that a function (other than (meta ...) might return a value that's equal to its input but with new metadata hanging off it. On the other hand, it's pretty convenient to have both the inputs and validation errors together. I guess it comes down to what belongs in metadata. While errors are certainly data about other data, they don't feel to me like metadata a la :doc, :tag, :file, :line, and :test. They're the sort of thing I'd show in an application's UI as part of normal user interactions, rather than something used only behind the scenes, so they feel to me like first-class data. -hume. -- http://elhumidor.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---