On Thu, Jul 21, 2011 at 9:54 PM, David Nolen <dnolen.li...@gmail.com> wrote:
> On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer <m...@kotka.de> wrote: > >> Hi, >> >> Am Donnerstag, 21. Juli 2011 15:24:49 UTC+2 schrieb Ambrose >> Bonnaire-Sergeant: >> >> >> > Ah, but is mapsto? a boolean predicate? :) >> >> Why should ? denote a boolean predicate? This is logic programming, not >> functional programming. ;) In Mathematics i is the imaginary unit, in >> electrical engineering it's the current (with j being the imaginary unit.) >> > > Don't like it, but that's me :) > > >> > Sure, it acts like it when its arguments are concrete values, but ;) ... >> maybe there >> > is some virtue in the "o" suffix. >> >> This is something I personally don't like at all. What does this code do: >> (geto x y z)? You can't tell you have to look at the surrounding context. >> And that context can be arbitrary large. A similar example is Erlang pattern >> matching. What does this erlang code do: {X, Y} = {1, 2}? You can't tell. >> You have to look at the context whether X and/or Y are bound there. >> > > You do not need to look at the surrounding code to know what (geto x y z) > does. It establishes the geto relation between x y z. x must be some key in, > y must be a vector of key-value pairs and z must be a value in y. The > relation guarantees this. > > I think I understand where Meikel is coming from. The function can be used in radically different ways, depending on the values of the arguments, which is somewhat unnerving. (I sympathize) Actually, David's explanation would make an excellent docstring for geto. I never really thought how the relation "guarantees" a contract like this, but now it seems obvious. Ambrose -- 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