Well, get-with-exception attempts to model a restriction on a relation (e.g. select in sql) so I believe a missing key indeed indicates an error.
On 21/03/2011, at 9:25 AM, Daniel Werner wrote: > On 20 March 2011 22:02, Andreas Kostler > <andreas.koestler.le...@gmail.com> wrote: >> Would that be flow control though? I see this exception as a rather >> exceptional circumstance for this application... > > If a missing key signifies an error, then yes, it should probably > throw an exception. It seems reading your code wrongly reminded me of > how in Python, it is idiomatic to catch KeyError if a key isn't > present, which can lead to unneccessarily nested and hard-to-read > logic. (Of course, there's also .get() in Python, with an identical > signature to Clojure's get) > > -- > 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 -- "Test-driven Dentistry (TDD!) - Not everything should be test driven" - Michael Fogus -- ********************************************************** Andreas Koestler, Software Engineer Leica Geosystems Pty Ltd 270 Gladstone Road, Dutton Park QLD 4102 Main: +61 7 3891 9772 Direct: +61 7 3117 8808 Fax: +61 7 3891 9336 Email: andreas.koest...@leica-geosystems.com ************www.leica-geosystems.com************* when it has to be right, Leica Geosystems Please consider the environment before printing this email. -- 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